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-30 23:43:57 +00:00
|
|
|
@CommandParameters(description = "Allows admins to see every time a potion is splashed.", 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());
|
2020-05-29 10:14:21 +00:00
|
|
|
plugin.al.save(admin);
|
2018-05-22 23:01:24 +00:00
|
|
|
plugin.al.updateTables();
|
|
|
|
msg("PotionSpy is now " + (admin.getPotionSpy() ? "enabled." : "disabled."));
|
2017-12-31 03:58:20 +00:00
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|