Skip to content

Commit c7c8615

Browse files
Changes for 2.7.2
- PVP command Response - Timer now rounds Minutes and Seconds - now at every round a new random player
1 parent ac44f2c commit c7c8615

File tree

9 files changed

+19
-10
lines changed

9 files changed

+19
-10
lines changed

src/main/java/de/vmoon/hasplugin/commands/HasCommand.java

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ else if (args[0].equalsIgnoreCase("version")) {
131131
sender.sendMessage("§cDu hast keine Berechtigung um diesen Befehl auszuführen!");
132132
return true;
133133
}
134-
sender.sendMessage("§c[HASPlugin] §rHASPlugin Version 2.7.1");
134+
sender.sendMessage("§c[HASPlugin] §rHASPlugin Version 2.7.2");
135135
return true;
136136
}
137137
else if (args[0].equalsIgnoreCase("stop")) {
@@ -567,10 +567,21 @@ public void run() {
567567
}
568568

569569
public void updateGlobalActionBar() {
570-
String actionBarMessage = ChatColor.GREEN + "Globaler Timer: " + ChatColor.WHITE + globalTimer + " Sekunden";
570+
int minutes = globalTimer / 60;
571+
int remainingSeconds = globalTimer % 60;
572+
String minuteString = minutes > 1 ? " Minuten" : " Minute";
573+
String secondString = remainingSeconds > 1 ? " Sekunden" : " Sekunde";
574+
575+
String timeMessage = ChatColor.GREEN + "Timer: " + ChatColor.WHITE;
576+
577+
if (minutes > 0) {
578+
timeMessage += minutes + minuteString + " ";
579+
}
580+
581+
timeMessage += remainingSeconds + secondString;
571582

572583
for (Player player : Bukkit.getOnlinePlayers()) {
573-
player.spigot().sendMessage(ChatMessageType.ACTION_BAR, TextComponent.fromLegacyText(actionBarMessage));
584+
player.spigot().sendMessage(ChatMessageType.ACTION_BAR, TextComponent.fromLegacyText(timeMessage));
574585
}
575586
}
576587

src/main/java/de/vmoon/hasplugin/commands/pvpCommand.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,15 +30,17 @@ public boolean onCommand(CommandSender sender, Command cmd, String s, String[] a
3030
return true;
3131
}
3232
else {
33+
sender.sendMessage("§2PVP wurde aktiviert!");
3334
enablepvp();
3435
}
3536
}
3637
else if (args[0].equalsIgnoreCase("off")) {
37-
if (!sender.hasPermission("pvp.on")) {
38+
if (!sender.hasPermission("pvp.off")) {
3839
sender.sendMessage("§cDu hast keine Berechtigung um diesen Befehl auszuführen!");
3940
return true;
4041
}
4142
else {
43+
sender.sendMessage("§2PVP wurde deaktiviert!");
4244
disablepvp();
4345
}
4446
}

src/main/resources/plugin.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: HASPlugin
2-
version: 2.7.1
2+
version: 2.7.2
33
# '${project.version}'
44
main: de.vmoon.hasplugin.HASPlugin
55
api-version: '1.20'
@@ -9,7 +9,6 @@ website: https://hasplugin.vmoon.de/
99
commands:
1010
has:
1111
description: The main Hide-and-Seek Command
12-
usage: /has [stop|select|reload|teleportall|help|skip|version|beep|endgame]
1312
permission: has.run
1413
children:
1514
has.stop:
@@ -45,7 +44,6 @@ commands:
4544
permission: has.endgame
4645
pvp:
4746
description: Aktiviert oder deaktiviert PVP.
48-
usage: /pvp [on|off]
4947
permission: pvp.use
5048
children:
5149
pvp.on:
187 Bytes
Binary file not shown.

target/HASPlugin-1.0-SNAPSHOT.jar

187 Bytes
Binary file not shown.
288 Bytes
Binary file not shown.
97 Bytes
Binary file not shown.

target/classes/plugin.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: HASPlugin
2-
version: 2.7.1
2+
version: 2.7.2
33
# '1.0-SNAPSHOT'
44
main: de.vmoon.hasplugin.HASPlugin
55
api-version: '1.20'
@@ -9,7 +9,6 @@ website: https://hasplugin.vmoon.de/
99
commands:
1010
has:
1111
description: The main Hide-and-Seek Command
12-
usage: /has [stop|select|reload|teleportall|help|skip|version|beep|endgame]
1312
permission: has.run
1413
children:
1514
has.stop:
@@ -45,7 +44,6 @@ commands:
4544
permission: has.endgame
4645
pvp:
4746
description: Aktiviert oder deaktiviert PVP.
48-
usage: /pvp [on|off]
4947
permission: pvp.use
5048
children:
5149
pvp.on:
187 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)