接口 Permissible
- 所有超级接口:
ServerOperator
- 所有已知子接口:
AbstractHorse
,Ageable
,Ambient
,Animals
,AreaEffectCloud
,ArmorStand
,Arrow
,Bat
,Blaze
,BlockCommandSender
,Boat
,CaveSpider
,ChestedHorse
,Chicken
,CommandMinecart
,CommandSender
,ComplexEntityPart
,ComplexLivingEntity
,ConsoleCommandSender
,Cow
,Creature
,Creeper
,Damageable
,Donkey
,DragonFireball
,Egg
,ElderGuardian
,EnderCrystal
,EnderDragon
,EnderDragonPart
,Enderman
,Endermite
,EnderPearl
,EnderSignal
,Entity
,Evoker
,EvokerFangs
,ExperienceOrb
,Explosive
,ExplosiveMinecart
,FallingBlock
,Fireball
,Firework
,Fish
,FishHook
,Flying
,Ghast
,Giant
,Golem
,Guardian
,Hanging
,HopperMinecart
,Horse
,HumanEntity
,Husk
,Illager
,Illusioner
,IronGolem
,Item
,ItemFrame
,LargeFireball
,LeashHitch
,LightningStrike
,LingeringPotion
,LivingEntity
,Llama
,LlamaSpit
,MagmaCube
,Minecart
,Monster
,Mule
,MushroomCow
,NPC
,Ocelot
,Painting
,Parrot
,Pig
,PigZombie
,Player
,PolarBear
,PoweredMinecart
,Projectile
,ProxiedCommandSender
,Rabbit
,RemoteConsoleCommandSender
,RideableMinecart
,Sheep
,Shulker
,ShulkerBullet
,Silverfish
,Skeleton
,SkeletonHorse
,Slime
,SmallFireball
,Snowball
,Snowman
,SpawnerMinecart
,SpectralArrow
,Spellcaster
,Spider
,SplashPotion
,Squid
,StorageMinecart
,Stray
,Tameable
,ThrownExpBottle
,ThrownPotion
,TippedArrow
,TNTPrimed
,Vehicle
,Vex
,Villager
,Vindicator
,WaterMob
,Weather
,Witch
,Wither
,WitherSkeleton
,WitherSkull
,Wolf
,Zombie
,ZombieHorse
,ZombieVillager
- 所有已知实现类:
PermissibleBase
Represents an object that may be assigned permissions
-
方法概要
修饰符和类型方法说明addAttachment
(Plugin plugin) Adds a new emptyPermissionAttachment
to this objectaddAttachment
(Plugin plugin, int ticks) Temporarily adds a new emptyPermissionAttachment
to this objectaddAttachment
(Plugin plugin, String name, boolean value) Adds a newPermissionAttachment
with a single permission by name and valueaddAttachment
(Plugin plugin, String name, boolean value, int ticks) Temporarily adds a newPermissionAttachment
with a single permission by name and valueGets a set containing all of the permissions currently in effect by this objectboolean
hasPermission
(String name) Gets the value of the specified permission, if set.boolean
hasPermission
(Permission perm) Gets the value of the specified permission, if set.boolean
isPermissionSet
(String name) Checks if this object contains an override for the specified permission, by fully qualified nameboolean
isPermissionSet
(Permission perm) Checks if this object contains an override for the specifiedPermission
void
Recalculates the permissions for this object, if the attachments have changed values.void
removeAttachment
(PermissionAttachment attachment) Removes the givenPermissionAttachment
from this object从接口继承的方法 org.bukkit.permissions.ServerOperator
isOp, setOp
-
方法详细资料
-
isPermissionSet
Checks if this object contains an override for the specified permission, by fully qualified name- 参数:
name
- Name of the permission- 返回:
- true if the permission is set, otherwise false
-
isPermissionSet
Checks if this object contains an override for the specifiedPermission
- 参数:
perm
- Permission to check- 返回:
- true if the permission is set, otherwise false
-
hasPermission
Gets the value of the specified permission, if set.If a permission override is not set on this object, the default value of the permission will be returned.
- 参数:
name
- Name of the permission- 返回:
- Value of the permission
-
hasPermission
Gets the value of the specified permission, if set.If a permission override is not set on this object, the default value of the permission will be returned
- 参数:
perm
- Permission to get- 返回:
- Value of the permission
-
addAttachment
Adds a newPermissionAttachment
with a single permission by name and value- 参数:
plugin
- Plugin responsible for this attachment, may not be null or disabledname
- Name of the permission to attachvalue
- Value of the permission- 返回:
- The PermissionAttachment that was just created
-
addAttachment
Adds a new emptyPermissionAttachment
to this object- 参数:
plugin
- Plugin responsible for this attachment, may not be null or disabled- 返回:
- The PermissionAttachment that was just created
-
addAttachment
Temporarily adds a newPermissionAttachment
with a single permission by name and value- 参数:
plugin
- Plugin responsible for this attachment, may not be null or disabledname
- Name of the permission to attachvalue
- Value of the permissionticks
- Amount of ticks to automatically remove this attachment after- 返回:
- The PermissionAttachment that was just created
-
addAttachment
Temporarily adds a new emptyPermissionAttachment
to this object- 参数:
plugin
- Plugin responsible for this attachment, may not be null or disabledticks
- Amount of ticks to automatically remove this attachment after- 返回:
- The PermissionAttachment that was just created
-
removeAttachment
Removes the givenPermissionAttachment
from this object- 参数:
attachment
- Attachment to remove- 抛出:
IllegalArgumentException
- Thrown when the specified attachment isn't part of this object
-
recalculatePermissions
void recalculatePermissions()Recalculates the permissions for this object, if the attachments have changed values.This should very rarely need to be called from a plugin.
-
getEffectivePermissions
Set<PermissionAttachmentInfo> getEffectivePermissions()Gets a set containing all of the permissions currently in effect by this object- 返回:
- Set of currently effective permissions
-