Class AdminPermissions

java.lang.Object
de.Keyle.MyPet.api.player.AdminPermissions

public final class AdminPermissions extends Object
Single source of truth for MyPet admin permission node strings + parent-gate helper.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    Permission to open a pet backpack while in creative mode.
    static final String
    Permission to ignore the respawn timer and its cost.
    static final String
    Permission to ignore the skilltree switch fee.
    static final String
    Permission to open a pet backpack the rules would otherwise close.
    static final String
    Permission to ignore skilltree requirements.
    static final String
    Permission to clone another player's pet.
    static final String
    Permission to create a pet directly, without taming.
    static final String
    Permission to open the browser-based config editor.
    static final String
    Permission to set or add a pet's experience.
    static final String
    Permission to change the server's experience rate.
    static final String
    Permission to import pet data from another pet plugin.
    static final String
    Permission to read any pet's admin info.
    static final String
    Permission to run /petadmin info against another player.
    static final String
    Permission to open another player's pet inventory with /petadmin inventory.
    static final String
    Permission to run /petadmin list against another player.
    static final List<String>
    The /mypetadmin subcommand nodes — used to gate the /mypetadmin parent literal.
    static final String
    Permission to rename another player's pet.
    static final String
    Permission to manage pet-storage NPCs.
    static final String
    Permission to have up to the configured maximum number of pets out at once, rather than a fixed tier.
    static final String
    Permission to store up to the configured maximum number of pets, rather than a fixed tier.
    static final String
    Permission to purge stored pets in bulk.
    static final String
    Permission to reload MyPet's configuration.
    static final String
    Permission to delete another player's pet.
    static final String
    Permission to revive a dead pet immediately.
    static final String
    Permission to send another player's pet away with /petadmin sendaway.
    static final String
    Permission to open the pet shop on another player's behalf.
    static final String
    Permission to run /petadmin skill against another player.
    static final String
    Permission to assign a skilltree to another player's pet.
    static final String
    Permission to switch another player's active pet.
    static final String
    Permission to use the support-ticket command.
    static final String
    Permission to trigger an update check or download.
  • Method Summary

    Modifier and Type
    Method
    Description
    static boolean
    hasAnyOf(Player player, List<String> nodes)
    True if the player holds any node in the set (a MyPet.admin holder has them all via children).
    A Brigadier .requires() predicate that admits non-player senders (console, command blocks) unconditionally and gates players on node.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • EDITOR

      public static final String EDITOR
      Permission to open the browser-based config editor.
      See Also:
    • IMPORT

      public static final String IMPORT
      Permission to import pet data from another pet plugin.
      See Also:
    • RELOAD

      public static final String RELOAD
      Permission to reload MyPet's configuration.
      See Also:
    • TICKET

      public static final String TICKET
      Permission to use the support-ticket command.
      See Also:
    • UPDATE

      public static final String UPDATE
      Permission to trigger an update check or download.
      See Also:
    • CLONE

      public static final String CLONE
      Permission to clone another player's pet.
      See Also:
    • CREATE

      public static final String CREATE
      Permission to create a pet directly, without taming.
      See Also:
    • EXP

      public static final String EXP
      Permission to set or add a pet's experience.
      See Also:
    • EXPRATE

      public static final String EXPRATE
      Permission to change the server's experience rate.
      See Also:
    • INFO

      public static final String INFO
      Permission to read any pet's admin info.
      See Also:
    • NAME

      public static final String NAME
      Permission to rename another player's pet.
      See Also:
    • NPC

      public static final String NPC
      Permission to manage pet-storage NPCs.
      See Also:
    • PURGE

      public static final String PURGE
      Permission to purge stored pets in bulk.
      See Also:
    • REMOVE

      public static final String REMOVE
      Permission to delete another player's pet.
      See Also:
    • RESPAWN

      public static final String RESPAWN
      Permission to revive a dead pet immediately.
      See Also:
    • SKILLTREE

      public static final String SKILLTREE
      Permission to assign a skilltree to another player's pet.
      See Also:
    • SWITCH

      public static final String SWITCH
      Permission to switch another player's active pet.
      See Also:
    • INFO_PLAYER

      public static final String INFO_PLAYER
      Permission to run /petadmin info against another player.
      See Also:
    • LIST

      public static final String LIST
      Permission to run /petadmin list against another player.
      See Also:
    • INVENTORY

      public static final String INVENTORY
      Permission to open another player's pet inventory with /petadmin inventory.
      See Also:
    • SENDAWAY

      public static final String SENDAWAY
      Permission to send another player's pet away with /petadmin sendaway.
      See Also:
    • SKILL

      public static final String SKILL
      Permission to run /petadmin skill against another player.
      See Also:
    • SHOP_OTHER

      public static final String SHOP_OTHER
      Permission to open the pet shop on another player's behalf.
      See Also:
    • BYPASS_SKILLTREE

      public static final String BYPASS_SKILLTREE
      Permission to ignore skilltree requirements.
      See Also:
    • BYPASS_FEE

      public static final String BYPASS_FEE
      Permission to ignore the skilltree switch fee.
      See Also:
    • BYPASS_DEATH

      public static final String BYPASS_DEATH
      Permission to ignore the respawn timer and its cost.
      See Also:
    • BYPASS_INVENTORY

      public static final String BYPASS_INVENTORY
      Permission to open a pet backpack the rules would otherwise close.
      See Also:
    • BYPASS_CREATIVE

      public static final String BYPASS_CREATIVE
      Permission to open a pet backpack while in creative mode.
      See Also:
    • PETSTORAGE_LIMIT_ALL

      public static final String PETSTORAGE_LIMIT_ALL
      Permission to store up to the configured maximum number of pets, rather than a fixed tier.
      See Also:
    • PETLIMIT_ACTIVE_ALL

      public static final String PETLIMIT_ACTIVE_ALL
      Permission to have up to the configured maximum number of pets out at once, rather than a fixed tier.
      See Also:
    • MYPETADMIN_NODES

      public static final List<String> MYPETADMIN_NODES
      The /mypetadmin subcommand nodes — used to gate the /mypetadmin parent literal.
  • Method Details

    • hasAnyOf

      public static boolean hasAnyOf(Player player, List<String> nodes)
      True if the player holds any node in the set (a MyPet.admin holder has them all via children).
      Parameters:
      player - the player to test
      nodes - the permission nodes to check
      Returns:
      true if the player holds at least one of them
    • requiresNode

      public static Predicate<CommandSourceStack> requiresNode(String node)
      A Brigadier .requires() predicate that admits non-player senders (console, command blocks) unconditionally and gates players on node. Single-sources the per-command admin gate so every subcommand wires it identically.
      Parameters:
      node - the permission node to require
      Returns:
      a predicate usable as a Brigadier command requirement