mirror of
https://github.com/AtlasMediaGroup/TotalFreedomMod.git
synced 2024-11-27 01:05:38 +00:00
Added /droptoggle
This commit is contained in:
parent
1ab74dae05
commit
8e7c9dcd8e
@ -0,0 +1,36 @@
|
|||||||
|
package me.StevenLawson.TotalFreedomMod.Commands;
|
||||||
|
|
||||||
|
import me.StevenLawson.TotalFreedomMod.TFM_Util;
|
||||||
|
import me.StevenLawson.TotalFreedomMod.TotalFreedomMod;
|
||||||
|
import org.bukkit.command.Command;
|
||||||
|
import org.bukkit.command.CommandSender;
|
||||||
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
|
@CommandPermissions(level = AdminLevel.SUPER, source = SourceType.BOTH)
|
||||||
|
@CommandParameters(description = "Enable/disable dropping.", usage = "/<command> <on | off>")
|
||||||
|
public class Command_firespread extends TFM_Command
|
||||||
|
{
|
||||||
|
@Override
|
||||||
|
public boolean run(CommandSender sender, Player sender_p, Command cmd, String commandLabel, String[] args, boolean senderIsConsole)
|
||||||
|
{
|
||||||
|
if (args.length != 1)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (args[0].equalsIgnoreCase("on"))
|
||||||
|
{
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user