CommandAPI 9.7.0
An API for the command UI introduced in Minecraft 1.13
Loading...
Searching...
No Matches
dev.jorel.commandapi.CommandPermission Class Reference

A representation of permission nodes for commands. More...

Classes

enum  PermissionNode
 

Public Member Functions

boolean equals (Object obj)
 
int hashCode ()
 
String toString ()
 Returns a human-readable string of this CommandPermission.
 
Optional< String > getPermission ()
 Returns the custom permission in string form if set.
 
boolean isNegated ()
 Returns if the permission is negated.
 

Static Public Member Functions

static CommandPermission fromString (String permission)
 Generates a new CommandPermission from a permission node.
 

Static Public Attributes

static final CommandPermission NONE = new CommandPermission(PermissionNode.NONE)
 Command can be run with no permissions.
 
static final CommandPermission OP = new CommandPermission(PermissionNode.OP)
 A player that has to be an operator to run a command.
 

Detailed Description

A representation of permission nodes for commands.

Represents permission nodes, being op and having all permissions

Member Function Documentation

◆ fromString()

static CommandPermission dev.jorel.commandapi.CommandPermission.fromString ( String permission)
static

Generates a new CommandPermission from a permission node.

Parameters
permissionthe permission node
Returns
a new CommandPermission

◆ getPermission()

Optional< String > dev.jorel.commandapi.CommandPermission.getPermission ( )

Returns the custom permission in string form if set.

Returns
An Optional<String> with the custom permission or an empty Optional if not set

◆ isNegated()

boolean dev.jorel.commandapi.CommandPermission.isNegated ( )

Returns if the permission is negated.

Returns
the permission's negation state

◆ toString()

String dev.jorel.commandapi.CommandPermission.toString ( )

Returns a human-readable string of this CommandPermission.

Returns
a human-readable string of this CommandPermission