Class FlagGroup<T extends Flag>

java.lang.Object
cn.lunadeer.dominion.api.dtos.flag.FlagGroup<T>
Type Parameters:
T - the supported flag type
Direct Known Subclasses:
EnvFlagGroup, PriFlagGroup

public abstract class FlagGroup<T extends Flag> extends Object
A logical, ordered group of flags used for presentation and bulk editing. Flag groups do not participate in permission evaluation.
  • Constructor Details

    • FlagGroup

      protected FlagGroup(@NotNull @NotNull String id, @NotNull @NotNull String displayName, @NotNull @NotNull String description, @NotNull @NotNull org.bukkit.Material material, @NotNull @NotNull Class<T> flagType, @NotNull @NotNull Collection<? extends T> flags)
    • FlagGroup

      protected FlagGroup(@NotNull @NotNull String id, @NotNull @NotNull String displayName, @NotNull @NotNull String description, @NotNull @NotNull org.bukkit.Material material, @Nullable @Nullable String icon, @NotNull @NotNull Class<T> flagType, @NotNull @NotNull Collection<? extends T> flags)
  • Method Details

    • getId

      @NotNull public final @NotNull String getId()
    • getDisplayName

      @NotNull public @NotNull String getDisplayName()
    • setDisplayName

      public void setDisplayName(@NotNull @NotNull String displayName)
    • getDescription

      @NotNull public @NotNull String getDescription()
    • setDescription

      public void setDescription(@NotNull @NotNull String description)
    • getMaterial

      @NotNull public @NotNull org.bukkit.Material getMaterial()
    • setMaterial

      public void setMaterial(@NotNull @NotNull org.bukkit.Material material)
    • getIcon

      @Nullable public @Nullable String getIcon()
    • setIcon

      public void setIcon(@Nullable @Nullable String icon)
      Null or blank means that this group has no Dialog UI icon.
    • addFlag

      public boolean addFlag(@NotNull T flag)
    • removeFlag

      public boolean removeFlag(@NotNull T flag)
    • containsFlag

      public boolean containsFlag(@NotNull T flag)
    • getFlags

      @NotNull public @NotNull List<T> getFlags()
    • getFlagType

      @NotNull public final @NotNull Class<T> getFlagType()
    • getDisplayNameKey

      @NotNull public final @NotNull String getDisplayNameKey()
      Returns the language key used for this group's display name.
      Returns:
      language key for the display name
    • getDescriptionKey

      @NotNull public final @NotNull String getDescriptionKey()
      Returns the language key used for this group's description.
      Returns:
      language key for the description
    • getConfigurationDialogUiIconKey

      @NotNull public final @NotNull String getConfigurationDialogUiIconKey()
      Returns the flags.yml key for this group's Dialog UI icon.
    • getLanguageNamespace

      @NotNull protected abstract @NotNull String getLanguageNamespace()