mirror of
https://github.com/plexusorg/Plex.git
synced 2025-07-04 16:56:40 +00:00
Begin work on implementing ranks
This commit is contained in:
28
src/main/java/dev/plex/command/impl/DeopAllCMD.java
Normal file
28
src/main/java/dev/plex/command/impl/DeopAllCMD.java
Normal file
@ -0,0 +1,28 @@
|
||||
package dev.plex.command.impl;
|
||||
|
||||
import dev.plex.command.PlexCommand;
|
||||
import dev.plex.command.annotation.CommandParameters;
|
||||
import dev.plex.command.annotation.CommandPermissions;
|
||||
import dev.plex.rank.enums.Rank;
|
||||
import dev.plex.util.PlexUtils;
|
||||
import net.kyori.adventure.text.Component;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
@CommandParameters(name = "deopall", description = "Deop everyone on the server", aliases = "deopa")
|
||||
@CommandPermissions(level = Rank.ADMIN)
|
||||
public class DeopAllCMD extends PlexCommand
|
||||
{
|
||||
@Override
|
||||
public Component execute(CommandSender sender, String[] args)
|
||||
{
|
||||
for (Player player : Bukkit.getOnlinePlayers())
|
||||
{
|
||||
player.setOp(false);
|
||||
}
|
||||
PlexUtils.broadcast(tl("deoppedAllPlayers", sender.getName()));
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user