接口 Permissible

所有超级接口:
ServerOperator
所有已知子接口:
AbstractArrow, AbstractHorse, AbstractSkeleton, AbstractVillager, AbstractWindCharge, Ageable, Allay, Ambient, Animals, AreaEffectCloud, Armadillo, ArmorStand, Arrow, Axolotl, Bat, Bee, Blaze, BlockCommandSender, BlockDisplay, Boat, Bogged, Boss, Breedable, Breeze, BreezeWindCharge, Camel, Cat, CaveSpider, ChestBoat, ChestedHorse, Chicken, Cod, CommandMinecart, CommandSender, ComplexEntityPart, ComplexLivingEntity, ConsoleCommandSender, Cow, Creature, Creeper, Damageable, Display, Dolphin, Donkey, DragonFireball, Drowned, Egg, ElderGuardian, EnderCrystal, EnderDragon, EnderDragonPart, Enderman, Endermite, EnderPearl, EnderSignal, Enemy, Entity, Evoker, EvokerFangs, ExperienceOrb, Explosive, ExplosiveMinecart, FallingBlock, Fireball, Firework, Fish, FishHook, Flying, Fox, Frog, Ghast, Giant, GlowItemFrame, GlowSquid, Goat, Golem, Guardian, Hanging, Hoglin, HopperMinecart, Horse, HumanEntity, Husk, Illager, Illusioner, Interaction, IronGolem, Item, ItemDisplay, ItemFrame, LargeFireball, LeashHitch, LightningStrike, LingeringPotion, LivingEntity, Llama, LlamaSpit, MagmaCube, Marker, Minecart, Mob, Monster, Mule, MushroomCow, NPC, Ocelot, OminousItemSpawner, Painting, Panda, Parrot, Phantom, Pig, Piglin, PiglinAbstract, PiglinBrute, PigZombie, Pillager, Player, PolarBear, PoweredMinecart, Projectile, ProxiedCommandSender, PufferFish, Rabbit, Raider, Ravager, RemoteConsoleCommandSender, RideableMinecart, Salmon, Sheep, Shulker, ShulkerBullet, Silverfish, SizedFireball, Skeleton, SkeletonHorse, Slime, SmallFireball, Sniffer, Snowball, Snowman, SpawnerMinecart, SpectralArrow, Spellcaster, Spider, SplashPotion, Squid, Steerable, StorageMinecart, Stray, Strider, Tadpole, Tameable, TextDisplay, ThrowableProjectile, ThrownExpBottle, ThrownPotion, TippedArrow, TNTPrimed, TraderLlama, Trident, TropicalFish, Turtle, Vehicle, Vex, Villager, Vindicator, WanderingTrader, Warden, WaterMob, WindCharge, Witch, Wither, WitherSkeleton, WitherSkull, Wolf, Zoglin, Zombie, ZombieHorse, ZombieVillager
所有已知实现类:
PermissibleBase

public interface Permissible extends ServerOperator
Represents an object that may be assigned permissions
  • 方法详细资料

    • isPermissionSet

      boolean isPermissionSet(@NotNull @NotNull String name)
      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

      boolean isPermissionSet(@NotNull @NotNull Permission perm)
      Checks if this object contains an override for the specified Permission
      参数:
      perm - Permission to check
      返回:
      true if the permission is set, otherwise false
    • hasPermission

      boolean hasPermission(@NotNull @NotNull String name)
      如果这个权限有设置在这个对象上, 就会返回这个权限的拥有状态.

      如果这个权限没有设置在这个对象上, 将会返回这个权限的默认拥有状态.

      原文: 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 - 权限的名字
      返回:
      是否拥有此权限
    • hasPermission

      boolean hasPermission(@NotNull @NotNull Permission perm)
      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

      @NotNull @NotNull PermissionAttachment addAttachment(@NotNull @NotNull Plugin plugin, @NotNull @NotNull String name, boolean value)
      Adds a new PermissionAttachment with a single permission by name and value
      参数:
      plugin - Plugin responsible for this attachment, may not be null or disabled
      name - Name of the permission to attach
      value - Value of the permission
      返回:
      The PermissionAttachment that was just created
    • addAttachment

      Adds a new empty PermissionAttachment to this object
      参数:
      plugin - Plugin responsible for this attachment, may not be null or disabled
      返回:
      The PermissionAttachment that was just created
    • addAttachment

      @Nullable @Nullable PermissionAttachment addAttachment(@NotNull @NotNull Plugin plugin, @NotNull @NotNull String name, boolean value, int ticks)
      Temporarily adds a new PermissionAttachment with a single permission by name and value
      参数:
      plugin - Plugin responsible for this attachment, may not be null or disabled
      name - Name of the permission to attach
      value - Value of the permission
      ticks - Amount of ticks to automatically remove this attachment after
      返回:
      The PermissionAttachment that was just created
    • addAttachment

      @Nullable @Nullable PermissionAttachment addAttachment(@NotNull @NotNull Plugin plugin, int ticks)
      Temporarily adds a new empty PermissionAttachment to this object
      参数:
      plugin - Plugin responsible for this attachment, may not be null or disabled
      ticks - Amount of ticks to automatically remove this attachment after
      返回:
      The PermissionAttachment that was just created
    • removeAttachment

      void removeAttachment(@NotNull @NotNull PermissionAttachment attachment)
      Removes the given PermissionAttachment 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

      @NotNull @NotNull Set<PermissionAttachmentInfo> getEffectivePermissions()
      Gets a set containing all of the permissions currently in effect by this object
      返回:
      Set of currently effective permissions