Class PermissionGroup
java.lang.Object
org.bukkit.permissions.PermissibleBase
net.mathias2246.buildmc.api.permission.PermissionGroup
- All Implemented Interfaces:
org.bukkit.permissions.Permissible, org.bukkit.permissions.ServerOperator
public class PermissionGroup
extends org.bukkit.permissions.PermissibleBase
-
Constructor Summary
ConstructorsConstructorDescriptionPermissionGroup(@NotNull String name, @NotNull org.bukkit.plugin.Plugin plugin) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddChildGroup(@NotNull PermissionGroup group) voidaddMember(@NotNull org.bukkit.permissions.Permissible member) @NotNull org.bukkit.permissions.PermissionAttachmentapplyToPlayer(org.bukkit.entity.Player player, @NotNull org.bukkit.plugin.Plugin plugin) Applies this group's effective permissions to a player via a PermissionAttachment.@NotNull Set<PermissionGroup> @NotNull Set<org.bukkit.permissions.Permissible> @NotNull StringgetName()voidgrantPermission(@NotNull String permission) Grants a permission to this group and recalculates.booleanhasMember(@NotNull org.bukkit.permissions.Permissible member) voidFully recalculates permissions by rebuilding from scratch.voidremoveChildGroup(@NotNull PermissionGroup group) voidremoveMember(@NotNull org.bukkit.permissions.Permissible member) voidrevokePermission(@NotNull String permission) Revokes a permission from this group and recalculates.Methods inherited from class org.bukkit.permissions.PermissibleBase
addAttachment, addAttachment, addAttachment, addAttachment, clearPermissions, getEffectivePermissions, hasPermission, hasPermission, isOp, isPermissionSet, isPermissionSet, recalculatePermissions, removeAttachment, setOpMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.bukkit.permissions.Permissible
permissionValue, permissionValue
-
Constructor Details
-
PermissionGroup
public PermissionGroup(@NotNull @NotNull String name, @NotNull @NotNull org.bukkit.plugin.Plugin plugin)
-
-
Method Details
-
getName
-
addMember
public void addMember(@NotNull @NotNull org.bukkit.permissions.Permissible member) -
removeMember
public void removeMember(@NotNull @NotNull org.bukkit.permissions.Permissible member) -
hasMember
public boolean hasMember(@NotNull @NotNull org.bukkit.permissions.Permissible member) -
getMembers
-
addChildGroup
-
removeChildGroup
-
getChildGroups
-
grantPermission
Grants a permission to this group and recalculates. -
revokePermission
Revokes a permission from this group and recalculates. -
recalculate
public void recalculate()Fully recalculates permissions by rebuilding from scratch. Call this whenever child group permissions change. -
applyToPlayer
@NotNull public @NotNull org.bukkit.permissions.PermissionAttachment applyToPlayer(@NotNull org.bukkit.entity.Player player, @NotNull @NotNull org.bukkit.plugin.Plugin plugin) Applies this group's effective permissions to a player via a PermissionAttachment. Store the returned attachment to remove it later on quit.
-