Merge remote-tracking branch 'origin/dev'

This commit is contained in:
Norbi Peti 2016-12-24 22:52:13 +01:00
commit e82f8c9eb3
2 changed files with 6 additions and 3 deletions

View file

@ -43,7 +43,7 @@ public class ScheduledRestartCommand extends TBMCCommandBase {
Bukkit.spigot().restart(); Bukkit.spigot().restart();
} }
if (restartcounter % 200 == 0) 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); restartbar.setProgress(restartcounter / restarttime);
restartcounter--; restartcounter--;
}, 1, 1); }, 1, 1);

View file

@ -56,8 +56,11 @@ public class TBMCChatAPI {
for (TBMCCommandBase cmd : TBMCChatAPI.GetCommands().values()) { for (TBMCCommandBase cmd : TBMCChatAPI.GetCommands().values()) {
if (cmd.GetCommandPath().startsWith(command + " ")) { if (cmd.GetCommandPath().startsWith(command + " ")) {
int ind = cmd.GetCommandPath().indexOf(' ', command.length() + 2); int ind = cmd.GetCommandPath().indexOf(' ', command.length() + 2);
if (ind >= 0) if (ind >= 0) {
continue; String newcmd = cmd.GetCommandPath().substring(0, ind);
if (!cmds.contains("/" + newcmd))
cmds.add("/" + newcmd);
}
if (cmd.GetPlayerOnly() && !(sender instanceof Player)) if (cmd.GetPlayerOnly() && !(sender instanceof Player))
continue; continue;
if (cmd.GetModOnly() && !MainPlugin.permission.has(sender, "tbmc.admin")) if (cmd.GetModOnly() && !MainPlugin.permission.has(sender, "tbmc.admin"))