2017-12-31 03:58:20 +00:00
|
|
|
package me.totalfreedom.totalfreedommod.command;
|
|
|
|
|
2018-05-22 23:01:24 +00:00
|
|
|
import me.totalfreedom.totalfreedommod.admin.Admin;
|
2017-12-31 03:58:20 +00:00
|
|
|
import me.totalfreedom.totalfreedommod.rank.Rank;
|
|
|
|
import org.bukkit.command.Command;
|
|
|
|
import org.bukkit.command.CommandSender;
|
|
|
|
import org.bukkit.entity.Player;
|
|
|
|
|
|
|
|
@CommandPermissions(level = Rank.SUPER_ADMIN, source = SourceType.ONLY_IN_GAME)
|
2020-03-17 00:58:44 +00:00
|
|
|
@CommandParameters(description = "Toggles PotionSpy.", usage = "/<command>", aliases = "potspy")
|
2017-12-31 03:58:20 +00:00
|
|
|
public class Command_potionspy extends FreedomCommand
|
|
|
|
{
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public boolean run(CommandSender sender, Player playerSender, Command cmd, String commandLabel, String[] args, boolean senderIsConsole)
|
|
|
|
{
|
2018-05-22 23:01:24 +00:00
|
|
|
Admin admin = plugin.al.getAdmin(playerSender);
|
|
|
|
admin.setPotionSpy(!admin.getPotionSpy());
|
|
|
|
plugin.al.save();
|
|
|
|
plugin.al.updateTables();
|
|
|
|
msg("PotionSpy is now " + (admin.getPotionSpy() ? "enabled." : "disabled."));
|
2017-12-31 03:58:20 +00:00
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|