Class MenuBackgroundChoice

java.lang.Object
dev.itsharshxd.zentrix.api.gui.background.MenuBackgroundChoice

public final class MenuBackgroundChoice extends Object
What a MenuBackgroundResolver decided for one menu.

Glyphs are written as in guis.yml: a name from backgrounds.glyphs, the characters themselves (a unicode escape written as text works too), or none. They get the shared backgrounds.color and backgrounds.reset, exactly like a rule's glyphs, so an add-on can ship textures that server owners place with their own pack's spacing.

Since:
1.15.0
  • Method Details

    • keep

      @NotNull public static @NotNull MenuBackgroundChoice keep()
      Leaves the decision to the next resolver, and in the end to guis.yml.
    • none

      @NotNull public static @NotNull MenuBackgroundChoice none()
      No texture: the menu shows its plain name.
    • glyphs

      @NotNull public static @NotNull MenuBackgroundChoice glyphs(@NotNull @NotNull String glyphs)
      A texture of the resolver's own, with the menu name shown or hidden as backgrounds.text says.
      Parameters:
      glyphs - a palette name, the characters themselves, or none
    • glyphs

      @NotNull public static @NotNull MenuBackgroundChoice glyphs(@NotNull @NotNull String glyphs, boolean nameShown)
      A texture of the resolver's own.
      Parameters:
      glyphs - a palette name, the characters themselves, or none
      nameShown - whether the menu name follows the texture
    • isKeep

      public boolean isKeep()
      Whether this leaves the decision to others.
    • isNone

      public boolean isNone()
      Whether this removes the texture.
    • getGlyphs

      @NotNull public @NotNull Optional<String> getGlyphs()
      The glyphs of a texture of the resolver's own.
    • getNameShown

      @Nullable public @Nullable Boolean getNameShown()
      Whether the menu name follows the texture: true or false when the resolver said, null to follow backgrounds.text.
    • toString

      public String toString()
      Overrides:
      toString in class Object