Skip to content

Commit

Permalink
Fixed /bteg restart
Browse files Browse the repository at this point in the history
  • Loading branch information
Le4nderS committed Jan 15, 2022
1 parent db9d8f3 commit 2d87d29
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/main/java/de/leander/bteggamemode/commands/RestartTimer.java
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,14 @@ public boolean onCommand(CommandSender sender, Command cmd, String label, String
}
else if(args.length == 1 || args.length == 2){


if(args[0].matches("restart")) {
if(args[0].matches("cancel") || args[0].matches("stop")){
runnable.cancel();
for (Player p : Bukkit.getOnlinePlayers()) {
p.sendMessage("§b§lBTEG §7» §4Restart of " + Bukkit.getServerName() + " canceled!");
p.spigot().sendMessage(ChatMessageType.ACTION_BAR, new TextComponent(""));
}
return true;
}else if(args[0].matches("restart")) {
if(args.length == 2){
timeleft = Integer.parseInt(args[1]);
}
Expand Down

0 comments on commit 2d87d29

Please sign in to comment.