Class SimplePermissions
java.lang.Object
net.dillon.dillonlib.util.SimplePermissions
A utility class for getting simple permission levels that can be used in custom commands.
- Since:
- 1.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanadmin(net.minecraft.commands.CommandSourceStack commandSourceStack) static booleanall(net.minecraft.commands.CommandSourceStack commandSourceStack) static booleangamemaster(net.minecraft.commands.CommandSourceStack commandSourceStack) static booleanhasPermissionLevel(net.minecraft.commands.CommandSourceStack commandSourceStack, net.minecraft.server.permissions.PermissionLevel level) static booleanmoderator(net.minecraft.commands.CommandSourceStack commandSourceStack) static booleannotPlayer(net.minecraft.commands.CommandSourceStack commandSourceStack) static booleanowner(net.minecraft.commands.CommandSourceStack commandSourceStack)
-
Constructor Details
-
SimplePermissions
public SimplePermissions()
-
-
Method Details
-
hasPermissionLevel
public static boolean hasPermissionLevel(net.minecraft.commands.CommandSourceStack commandSourceStack, net.minecraft.server.permissions.PermissionLevel level) - Returns:
- if the player's permission level is equivalent to the passed in value.
-
all
public static boolean all(net.minecraft.commands.CommandSourceStack commandSourceStack) - Returns:
- if the player has no permissions (meaning they can use any non-op required command).
-
moderator
public static boolean moderator(net.minecraft.commands.CommandSourceStack commandSourceStack) - Returns:
- if the player has moderator permissions.
-
gamemaster
public static boolean gamemaster(net.minecraft.commands.CommandSourceStack commandSourceStack) - Returns:
- if the player has gamemaster permissions.
-
admin
public static boolean admin(net.minecraft.commands.CommandSourceStack commandSourceStack) - Returns:
- if the player has admin (or operator) permissions.
-
owner
public static boolean owner(net.minecraft.commands.CommandSourceStack commandSourceStack) - Returns:
- if the player has owner permissions.
-
notPlayer
public static boolean notPlayer(net.minecraft.commands.CommandSourceStack commandSourceStack) - Returns:
- the command has to be executed by console or command block (not directly by a player).
-