TotalFreedomMod/src/main/java/me/totalfreedom/totalfreedommod/command/Command_cmdspy.java
Jerom van der Sar 6edb6be7d9 Many changes for TFM 5.0
Improved admin system
Improved Rank system
Implemented config converter
Improved command handling
Updated Aero
2016-03-06 16:58:59 +01:00

25 lines
901 B
Java

package me.totalfreedom.totalfreedommod.command;
import me.totalfreedom.totalfreedommod.player.FPlayer;
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)
@CommandParameters(description = "Spy on commands", usage = "/<command>", aliases = "commandspy")
public class Command_cmdspy extends FreedomCommand
{
@Override
public boolean run(CommandSender sender, Player playerSender, Command cmd, String commandLabel, String[] args, boolean senderIsConsole)
{
FPlayer playerdata = plugin.pl.getPlayer(playerSender);
playerdata.setCommandSpy(!playerdata.cmdspyEnabled());
msg("CommandSpy " + (playerdata.cmdspyEnabled() ? "enabled." : "disabled."));
return true;
}
}