Added /health

This commit is contained in:
Jerom van der Sar 2012-12-28 00:27:54 +01:00
parent ca4e64cc0e
commit 7c360baa3c
4 changed files with 15 additions and 6 deletions

View File

@ -8,7 +8,7 @@ import org.bukkit.command.Command;
import org.bukkit.command.CommandSender; import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;
@CommandPermissions(level = ADMIN_LEVEL.SENIOR, source = SOURCE_TYPE_ALLOWED.ONLY_CONSOLE, block_host_console = true, ignore_permissions = false) @CommandPermissions(level = ADMIN_LEVEL.SUPER, source = SOURCE_TYPE_ALLOWED.BOTH, block_host_console = true, ignore_permissions = false)
public class Command_permban extends TFM_Command public class Command_permban extends TFM_Command
{ {
@Override @Override
@ -25,6 +25,11 @@ public class Command_permban extends TFM_Command
} }
else if (args[0].equalsIgnoreCase("reload")) else if (args[0].equalsIgnoreCase("reload"))
{ {
if (!senderIsConsole)
{
sender.sendMessage(TotalFreedomMod.MSG_NO_PERMS);
return true;
}
TFM_Util.playerMsg(sender, "Reloading permban list...", ChatColor.RED); TFM_Util.playerMsg(sender, "Reloading permban list...", ChatColor.RED);
TotalFreedomMod.loadPermbanConfig(); TotalFreedomMod.loadPermbanConfig();
dumplist(sender); dumplist(sender);
@ -46,7 +51,7 @@ public class Command_permban extends TFM_Command
else else
{ {
TFM_Util.playerMsg(sender, TotalFreedomMod.permbanned_players.size() + " permanently banned players:"); TFM_Util.playerMsg(sender, TotalFreedomMod.permbanned_players.size() + " permanently banned players:");
TFM_Util.playerMsg(sender, ChatColor.GRAY + StringUtils.join(TotalFreedomMod.permbanned_players, ", ")); TFM_Util.playerMsg(sender, StringUtils.join(TotalFreedomMod.permbanned_players, ", "));
} }
if (TotalFreedomMod.permbanned_ips.isEmpty()) if (TotalFreedomMod.permbanned_ips.isEmpty())
@ -56,7 +61,7 @@ public class Command_permban extends TFM_Command
else else
{ {
TFM_Util.playerMsg(sender, TotalFreedomMod.permbanned_ips.size() + " permanently banned IPs:"); TFM_Util.playerMsg(sender, TotalFreedomMod.permbanned_ips.size() + " permanently banned IPs:");
TFM_Util.playerMsg(sender, ChatColor.GRAY + StringUtils.join(TotalFreedomMod.permbanned_ips, ", ")); TFM_Util.playerMsg(sender, StringUtils.join(TotalFreedomMod.permbanned_ips, ", "));
} }
} }
} }

View File

@ -39,7 +39,6 @@ public class TFM_EntityListener implements Listener
if (!TotalFreedomMod.allowFireSpread) if (!TotalFreedomMod.allowFireSpread)
{ {
event.setCancelled(true); event.setCancelled(true);
return;
} }
} }
@ -53,7 +52,6 @@ public class TFM_EntityListener implements Listener
if (!TotalFreedomMod.allowLavaDamage) if (!TotalFreedomMod.allowLavaDamage)
{ {
event.setCancelled(true); event.setCancelled(true);
return;
} }
} }
} }
@ -125,7 +123,6 @@ public class TFM_EntityListener implements Listener
if (mobcount > TotalFreedomMod.mobLimiterMax) if (mobcount > TotalFreedomMod.mobLimiterMax)
{ {
event.setCancelled(true); event.setCancelled(true);
return;
} }
} }
} }

View File

@ -56,6 +56,10 @@ public class TFM_PlayerListener implements Listener
event.setCancelled(true); event.setCancelled(true);
return; return;
} }
case POTION:
{
}
} }
break; break;
} }

View File

@ -92,6 +92,9 @@ commands:
halt: halt:
description: Superadmin command - Halts a player description: Superadmin command - Halts a player
usage: /<command> <<partialname> | all | purge | list> usage: /<command> <<partialname> | all | purge | list>
health:
description: Superadmin command - View ticks-per-second
usage: /<command>
kicknoob: kicknoob:
description: Superadmin command - Kick all non-superadmins on server. description: Superadmin command - Kick all non-superadmins on server.
usage: /<command> usage: /<command>