Merge remote-tracking branch 'origin/dev'
This commit is contained in:
commit
e82f8c9eb3
2 changed files with 6 additions and 3 deletions
|
@ -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);
|
||||||
|
|
|
@ -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"))
|
||||||
|
|
Loading…
Reference in a new issue