Class PrefixConfig


  • public class PrefixConfig
    extends Object
    • Field Detail

      • identifier

        @NotNull
        protected final @NotNull String identifier
      • name

        @NotNull
        protected final @NotNull String name
      • content

        @NotNull
        protected final @NotNull String content
      • weight

        protected final int weight
      • permission

        @Nullable
        protected final @Nullable String permission
      • itemHasPermission

        @NotNull
        protected final @NotNull ItemStack itemHasPermission
      • itemNoPermission

        @Nullable
        protected final @Nullable ItemStack itemNoPermission
      • itemWhenUsing

        @Nullable
        protected final @Nullable ItemStack itemWhenUsing
    • Constructor Detail

      • PrefixConfig

        public PrefixConfig​(@NotNull
                            @NotNull String identifier,
                            @NotNull
                            @NotNull String name,
                            @NotNull
                            @NotNull String content,
                            int weight,
                            @Nullable
                            @Nullable String permission,
                            @NotNull
                            @NotNull List<GUIActionConfiguration> actions,
                            @NotNull
                            @NotNull ItemStack itemHasPermission,
                            @Nullable
                            @Nullable ItemStack itemWhenUsing,
                            @Nullable
                            @Nullable ItemStack itemNoPermission)
    • Method Detail

      • getIdentifier

        @NotNull
        public @NotNull String getIdentifier()
      • getName

        @NotNull
        public @NotNull String getName()
      • getContent

        @NotNull
        public @NotNull String getContent()
      • getWeight

        public int getWeight()
      • getPermission

        @Nullable
        public @Nullable String getPermission()
      • getItemHasPermission

        @NotNull
        public @NotNull ItemStack getItemHasPermission​(@Nullable
                                                       @Nullable Player player)
      • getItemNoPermission

        @Nullable
        public @Nullable ItemStack getItemNoPermission​(@Nullable
                                                       @Nullable Player player)
      • getItemWhenUsing

        @Nullable
        public @Nullable ItemStack getItemWhenUsing​(@Nullable
                                                    @Nullable Player player)
      • getItem

        @Contract("_,!null->!null")
        @Nullable
        protected @Nullable ItemStack getItem​(@Nullable
                                              @Nullable Player player,
                                              @Nullable
                                              @Nullable ItemStack item)
      • isPublic

        public boolean isPublic()
      • executeActions

        public void executeActions​(@NotNull
                                   @NotNull Player player)
      • isVisible

        public boolean isVisible​(Player player)
      • checkPermission

        public boolean checkPermission​(Player player)
        判断某玩家是否有权限使用该前缀
        Parameters:
        player - 玩家
        Returns:
        若前缀标识不存在,则返回false;若前缀为默认前缀,或该前缀无权限,或玩家有该前缀的权限,则返回true。