mirror of
https://github.com/AtlasMediaGroup/TotalFreedomMod.git
synced 2024-11-20 14:25:00 +00:00
28 lines
923 B
Java
28 lines
923 B
Java
package me.totalfreedom.totalfreedommod.command;
|
|
|
|
import me.totalfreedom.totalfreedommod.rank.Rank;
|
|
import me.totalfreedom.totalfreedommod.util.FUtil;
|
|
import org.bukkit.command.Command;
|
|
import org.bukkit.command.CommandSender;
|
|
import org.bukkit.entity.Player;
|
|
|
|
@CommandPermissions(level = Rank.OP, source = SourceType.BOTH, cooldown = 30)
|
|
@CommandParameters(description = "OP everyone on the server.", usage = "/<command>")
|
|
public class Command_opall extends FreedomCommand
|
|
{
|
|
|
|
@Override
|
|
public boolean run(CommandSender sender, Player playerSender, Command cmd, String commandLabel, String[] args, boolean senderIsConsole)
|
|
{
|
|
FUtil.adminAction(sender.getName(), "Opping all players on the server", false);
|
|
|
|
for (Player player : server.getOnlinePlayers())
|
|
{
|
|
player.setOp(true);
|
|
player.sendMessage(FreedomCommand.YOU_ARE_OP);
|
|
}
|
|
|
|
return true;
|
|
}
|
|
}
|