java.lang.Object
com.bencodez.advancedcore.api.bookgui.Layout

public class Layout extends Object
Represents a layout for book GUIs.
  • Constructor Details

    • Layout

      public Layout(ArrayList<String> layout)
      Creates a new layout.
      Parameters:
      layout - the string layout
  • Method Details

    • addPlaceholder

      public Layout addPlaceholder(String toReplace, String replaceWith)
      Adds a placeholder replacement.
      Parameters:
      toReplace - the text to replace
      replaceWith - the replacement text
      Returns:
      this layout for chaining
    • getLayout

      public net.md_5.bungee.api.chat.BaseComponent[] getLayout(HashMap<String,String> placeholders)
      Gets the layout with placeholders replaced.
      Parameters:
      placeholders - the placeholders to replace
      Returns:
      the layout components
    • replaceTextComponent

      public Layout replaceTextComponent(String text, net.md_5.bungee.api.chat.BaseComponent compToAdd)
      Replaces text with a component.
      Parameters:
      text - the text to replace
      compToAdd - the component to add
      Returns:
      this layout for chaining