mirror of
https://github.com/AtlasMediaGroup/TotalFreedomMod.git
synced 2024-11-27 01:05:38 +00:00
commit
ca5b79331b
@ -1,14 +1,13 @@
|
|||||||
package me.StevenLawson.TotalFreedomMod.Commands;
|
package me.StevenLawson.TotalFreedomMod.Commands;
|
||||||
|
|
||||||
import me.StevenLawson.TotalFreedomMod.TFM_Util;
|
import me.StevenLawson.TotalFreedomMod.TFM_Util;
|
||||||
import me.StevenLawson.TotalFreedomMod.TotalFreedomMod;
|
|
||||||
import org.bukkit.OfflinePlayer;
|
import org.bukkit.OfflinePlayer;
|
||||||
import org.bukkit.command.Command;
|
import org.bukkit.command.Command;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
@CommandPermissions(level = AdminLevel.OP, source = SourceType.BOTH)
|
@CommandPermissions(level = AdminLevel.OP, source = SourceType.BOTH)
|
||||||
@CommandParameters(description = "Manage operators", usage = "/<command> <count | list | purge>")
|
@CommandParameters(description = "Manage operators", usage = "/<command> <count | list>")
|
||||||
public class Command_ops extends TFM_Command
|
public class Command_ops extends TFM_Command
|
||||||
{
|
{
|
||||||
@Override
|
@Override
|
||||||
@ -51,29 +50,6 @@ public class Command_ops extends TFM_Command
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (args[0].equalsIgnoreCase("purge"))
|
|
||||||
{
|
|
||||||
if (!senderIsConsole)
|
|
||||||
{
|
|
||||||
playerMsg(TotalFreedomMod.MSG_NO_PERMS);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
TFM_Util.adminAction(sender.getName(), "Removing all operators", true);
|
|
||||||
|
|
||||||
for (OfflinePlayer player : server.getOperators())
|
|
||||||
{
|
|
||||||
player.setOp(false);
|
|
||||||
|
|
||||||
if (player.isOnline())
|
|
||||||
{
|
|
||||||
player.getPlayer().sendMessage(TotalFreedomMod.YOU_ARE_NOT_OP);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user