mirror of
https://github.com/AtlasMediaGroup/TotalFreedomMod.git
synced 2024-11-27 01:05:38 +00:00
Cleanup Command_droptoggle.
This commit is contained in:
parent
8e7c9dcd8e
commit
cbe7cdc474
@ -7,8 +7,8 @@ import org.bukkit.command.CommandSender;
|
|||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
@CommandPermissions(level = AdminLevel.SUPER, source = SourceType.BOTH)
|
@CommandPermissions(level = AdminLevel.SUPER, source = SourceType.BOTH)
|
||||||
@CommandParameters(description = "Enable/disable dropping.", usage = "/<command> <on | off>")
|
@CommandParameters(description = "Enable/disable auto entity wiper.", usage = "/<command> <on | off>")
|
||||||
public class Command_firespread extends TFM_Command
|
public class Command_droptoggle extends TFM_Command
|
||||||
{
|
{
|
||||||
@Override
|
@Override
|
||||||
public boolean run(CommandSender sender, Player sender_p, Command cmd, String commandLabel, String[] args, boolean senderIsConsole)
|
public boolean run(CommandSender sender, Player sender_p, Command cmd, String commandLabel, String[] args, boolean senderIsConsole)
|
||||||
@ -17,20 +17,9 @@ public class Command_firespread extends TFM_Command
|
|||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
TFM_Util.adminAction(sender.getName(),
|
||||||
if (args[0].equalsIgnoreCase("on"))
|
((TotalFreedomMod.autoEntityWipe = !args[0].equalsIgnoreCase("off")) ? "Enabled" : "Disabled")
|
||||||
{
|
+ " automatic entity wiping.", false);
|
||||||
TotalFreedomMod.autoEntityWipe = true;
|
|
||||||
playerMsg("Drops are now enabled!");
|
|
||||||
TFM_Util.adminAction(sender.getName(), "Enabling drops", false);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
TotalFreedomMod.autoEntityWipe = false;
|
|
||||||
playerMsg("Drops are now disabled.");
|
|
||||||
TFM_Util.adminAction(sender.getName(), "Disabling drops", true);
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user