From e793571845d35b005e335f2177d7d5d4993feb07 Mon Sep 17 00:00:00 2001 From: NorbiPeti Date: Fri, 23 Dec 2016 12:39:24 +0100 Subject: [PATCH 1/2] Made the restart counter show seconds... --- src/main/java/buttondevteam/core/ScheduledRestartCommand.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/buttondevteam/core/ScheduledRestartCommand.java b/src/main/java/buttondevteam/core/ScheduledRestartCommand.java index cc930b7..dd839c3 100644 --- a/src/main/java/buttondevteam/core/ScheduledRestartCommand.java +++ b/src/main/java/buttondevteam/core/ScheduledRestartCommand.java @@ -43,7 +43,7 @@ public class ScheduledRestartCommand extends TBMCCommandBase { Bukkit.spigot().restart(); } if (restartcounter % 200 == 0) - Bukkit.broadcastMessage("§c-- The server is restarting in " + restartcounter); + Bukkit.broadcastMessage("§c-- The server is restarting in " + restartcounter / 20 + " seconds!"); restartbar.setProgress(restartcounter / restarttime); restartcounter--; }, 1, 1); From ef0b9caa8646286595fc0ab9ba8d9a0aeb064781 Mon Sep 17 00:00:00 2001 From: NorbiPeti Date: Fri, 23 Dec 2016 23:25:56 +0100 Subject: [PATCH 2/2] Probably fixed ButtonChat#57 Haven't tested yet --- src/main/java/buttondevteam/lib/chat/TBMCChatAPI.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/main/java/buttondevteam/lib/chat/TBMCChatAPI.java b/src/main/java/buttondevteam/lib/chat/TBMCChatAPI.java index 8965942..8039c55 100644 --- a/src/main/java/buttondevteam/lib/chat/TBMCChatAPI.java +++ b/src/main/java/buttondevteam/lib/chat/TBMCChatAPI.java @@ -56,8 +56,11 @@ public class TBMCChatAPI { for (TBMCCommandBase cmd : TBMCChatAPI.GetCommands().values()) { if (cmd.GetCommandPath().startsWith(command + " ")) { int ind = cmd.GetCommandPath().indexOf(' ', command.length() + 2); - if (ind >= 0) - continue; + if (ind >= 0) { + String newcmd = cmd.GetCommandPath().substring(0, ind); + if (!cmds.contains("/" + newcmd)) + cmds.add("/" + newcmd); + } if (cmd.GetPlayerOnly() && !(sender instanceof Player)) continue; if (cmd.GetModOnly() && !MainPlugin.permission.has(sender, "tbmc.admin"))