ServerOperator
AbstractArrow
, AbstractHorse
, AbstractVillager
, Ageable
, Ambient
, Animals
, AreaEffectCloud
, ArmorStand
, Arrow
, Bat
, Bee
, Blaze
, BlockCommandSender
, Boat
, Boss
, Cat
, CaveSpider
, ChestedHorse
, Chicken
, Cod
, CommandMinecart
, CommandSender
, ComplexEntityPart
, ComplexLivingEntity
, ConsoleCommandSender
, Cow
, Creature
, Creeper
, Damageable
, Dolphin
, Donkey
, DragonFireball
, Drowned
, Egg
, ElderGuardian
, EnderCrystal
, EnderDragon
, EnderDragonPart
, Enderman
, Endermite
, EnderPearl
, EnderSignal
, Entity
, Evoker
, EvokerFangs
, ExperienceOrb
, Explosive
, ExplosiveMinecart
, FallingBlock
, Fireball
, Firework
, Fish
, FishHook
, Flying
, Fox
, Ghast
, Giant
, Golem
, Guardian
, Hanging
, HopperMinecart
, Horse
, HumanEntity
, Husk
, Illager
, Illusioner
, IronGolem
, Item
, ItemFrame
, LargeFireball
, LeashHitch
, LightningStrike
, LingeringPotion
, LivingEntity
, Llama
, LlamaSpit
, MagmaCube
, MessageCommandSender
, Minecart
, Mob
, Monster
, Mule
, MushroomCow
, NPC
, Ocelot
, Painting
, Panda
, Parrot
, Phantom
, Pig
, PigZombie
, Pillager
, Player
, PolarBear
, PoweredMinecart
, Projectile
, ProxiedCommandSender
, PufferFish
, Rabbit
, Raider
, RangedEntity
, Ravager
, RemoteConsoleCommandSender
, RideableMinecart
, Salmon
, Sheep
, Shulker
, ShulkerBullet
, Silverfish
, SizedFireball
, Skeleton
, SkeletonHorse
, Slime
, SmallFireball
, Snowball
, Snowman
, SpawnerMinecart
, SpectralArrow
, Spellcaster
, Spider
, SplashPotion
, Squid
, StorageMinecart
, Stray
, Tameable
, ThrowableProjectile
, ThrownExpBottle
, ThrownPotion
, TippedArrow
, TNTPrimed
, TraderLlama
, Trident
, TropicalFish
, Turtle
, Vehicle
, Vex
, Villager
, Vindicator
, WanderingTrader
, WaterMob
, Witch
, Wither
, WitherSkeleton
, WitherSkull
, Wolf
, Zombie
, ZombieHorse
, ZombieVillager
BufferedCommandSender
, PermissibleBase
, TimingsReportListener
public interface Permissible extends ServerOperator
Modifier and Type | Method | Description |
---|---|---|
@NotNull PermissionAttachment |
addAttachment(@NotNull Plugin plugin) |
Adds a new empty
PermissionAttachment to this object |
@Nullable PermissionAttachment |
addAttachment(@NotNull Plugin plugin,
int ticks) |
Temporarily adds a new empty
PermissionAttachment to this
object |
@NotNull PermissionAttachment |
addAttachment(@NotNull Plugin plugin,
@NotNull String name,
boolean value) |
Adds a new
PermissionAttachment with a single permission by
name and value |
@Nullable PermissionAttachment |
addAttachment(@NotNull Plugin plugin,
@NotNull String name,
boolean value,
int ticks) |
Temporarily adds a new
PermissionAttachment with a single
permission by name and value |
@NotNull Set<PermissionAttachmentInfo> |
getEffectivePermissions() |
Gets a set containing all of the permissions currently in effect by
this object
|
boolean |
hasPermission(@NotNull String name) |
Gets the value of the specified permission, if set.
|
boolean |
hasPermission(@NotNull Permission perm) |
Gets the value of the specified permission, if set.
|
boolean |
isPermissionSet(@NotNull String name) |
Checks if this object contains an override for the specified
permission, by fully qualified name
|
boolean |
isPermissionSet(@NotNull Permission perm) |
Checks if this object contains an override for the specified
Permission |
void |
recalculatePermissions() |
Recalculates the permissions for this object, if the attachments have
changed values.
|
void |
removeAttachment(@NotNull PermissionAttachment attachment) |
Removes the given
PermissionAttachment from this object |
isOp, setOp
boolean isPermissionSet(@NotNull @NotNull String name)
name
- Name of the permissionboolean isPermissionSet(@NotNull @NotNull Permission perm)
Permission
perm
- Permission to checkboolean hasPermission(@NotNull @NotNull String name)
If a permission override is not set on this object, the default value of the permission will be returned.
name
- Name of the permissionboolean hasPermission(@NotNull @NotNull Permission perm)
If a permission override is not set on this object, the default value of the permission will be returned
perm
- Permission to get@NotNull @NotNull PermissionAttachment addAttachment(@NotNull @NotNull Plugin plugin, @NotNull @NotNull String name, boolean value)
PermissionAttachment
with a single permission by
name and valueplugin
- Plugin responsible for this attachment, may not be null
or disabledname
- Name of the permission to attachvalue
- Value of the permission@NotNull @NotNull PermissionAttachment addAttachment(@NotNull @NotNull Plugin plugin)
PermissionAttachment
to this objectplugin
- Plugin responsible for this attachment, may not be null
or disabled@Nullable @Nullable PermissionAttachment addAttachment(@NotNull @NotNull Plugin plugin, @NotNull @NotNull String name, boolean value, int ticks)
PermissionAttachment
with a single
permission by name and valueplugin
- 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@Nullable @Nullable PermissionAttachment addAttachment(@NotNull @NotNull Plugin plugin, int ticks)
PermissionAttachment
to this
objectplugin
- Plugin responsible for this attachment, may not be null
or disabledticks
- Amount of ticks to automatically remove this attachment
aftervoid removeAttachment(@NotNull @NotNull PermissionAttachment attachment)
PermissionAttachment
from this objectattachment
- Attachment to removeIllegalArgumentException
- Thrown when the specified attachment
isn't part of this objectvoid recalculatePermissions()
This should very rarely need to be called from a plugin.
@NotNull @NotNull Set<PermissionAttachmentInfo> getEffectivePermissions()
Copyright © 2020. All rights reserved.