Package net.minestom.server.permission
Class Permission
java.lang.Object
net.minestom.server.permission.Permission
Representation of a permission granted to a
CommandSender
.
Each permission has a string representation used as an identifier, and an optional
CompoundBinaryTag
used to store additional data.
The class is immutable.
-
Constructor Summary
ConstructorDescriptionPermission
(@NotNull String permissionName) Creates a new permission object without additional dataPermission
(@NotNull String permissionName, @Nullable net.kyori.adventure.nbt.CompoundBinaryTag data) Creates a new permission object with optional data. -
Method Summary
-
Constructor Details
-
Permission
public Permission(@NotNull @NotNull String permissionName, @Nullable @Nullable net.kyori.adventure.nbt.CompoundBinaryTag data) Creates a new permission object with optional data.- Parameters:
permissionName
- the name of the permissiondata
- the optional data of the permission
-
Permission
Creates a new permission object without additional data- Parameters:
permissionName
- the name of the permission
-
-
Method Details
-
getPermissionName
Gets the name of the permission.- Returns:
- the permission name
-
getNBTData
@Nullable public @Nullable net.kyori.adventure.nbt.CompoundBinaryTag getNBTData()Gets the data associated to this permission.- Returns:
- the nbt data of this permission, can be null if not any
-
equals
-
hashCode
public int hashCode()
-