Class PlayerSkullButtonBuilder

java.lang.Object
net.staticstudios.menus.button.PlayerSkullButtonBuilder
All Implemented Interfaces:
Cloneable, ButtonBuilder

public class PlayerSkullButtonBuilder extends Object implements Cloneable, ButtonBuilder
  • Constructor Details

    • PlayerSkullButtonBuilder

      protected PlayerSkullButtonBuilder(boolean mutable)
  • Method Details

    • name

      public PlayerSkullButtonBuilder name(String name)
      Set the name of the button
      Parameters:
      name - the name
      Returns:
      the builder
    • name

      public PlayerSkullButtonBuilder name(net.kyori.adventure.text.Component name)
      Set the name of the button
      Parameters:
      name - the name
      Returns:
      the builder
    • description

      public PlayerSkullButtonBuilder description(List<String> description)
      Set the description of the button
      Parameters:
      description - the description
      Returns:
      the builder
    • description

      public PlayerSkullButtonBuilder description(String... description)
      Set the description of the button
      Parameters:
      description - the description
      Returns:
      the builder
    • description

      public PlayerSkullButtonBuilder description(String description)
      Set the description of the button
      Parameters:
      description - the description
      Returns:
      the builder
    • amount

      public PlayerSkullButtonBuilder amount(int amount)
      Set the amount of the button
      Parameters:
      amount - the amount
      Returns:
      the builder
    • enchanted

      public PlayerSkullButtonBuilder enchanted(boolean enchanted)
      Set if the button should be enchanted
      Parameters:
      enchanted - if the button should be enchanted
      Returns:
      the builder
    • playerProfile

      public PlayerSkullButtonBuilder playerProfile(com.destroystokyo.paper.profile.PlayerProfile playerProfile)
      Set the player profile of the button
      Parameters:
      playerProfile - the player profile
      Returns:
      the builder
    • player

      public PlayerSkullButtonBuilder player(org.bukkit.entity.Player player)
      Set the player profile from a player for the button
      Parameters:
      player - the player
      Returns:
      the builder
    • playerId

      public PlayerSkullButtonBuilder playerId(UUID playerId)
      Set the player profile from a player id for the button
      Parameters:
      playerId - the player id
      Returns:
      the builder
    • texture

      public PlayerSkullButtonBuilder texture(String base64Texture)
      Set the texture of the player skull
      Parameters:
      base64Texture - the texture, encoded in base64
      Returns:
      the builder
    • onLeftClick

      public PlayerSkullButtonBuilder onLeftClick(ButtonAction action)
      Add an action to run when the button is left-clicked
      Parameters:
      action - the action
      Returns:
      the builder
    • onRightClick

      public PlayerSkullButtonBuilder onRightClick(ButtonAction action)
      Add an action to run when the button is right-clicked
      Parameters:
      action - the action
      Returns:
      the builder
    • onClick

      public PlayerSkullButtonBuilder onClick(ButtonAction action)
      Add an action to run when the button is clicked
      Parameters:
      action - the action
      Returns:
      the builder
    • build

      public Button build()
      Description copied from interface: ButtonBuilder
      Build the button
      Specified by:
      build in interface ButtonBuilder
      Returns:
      The button
    • clone

      public PlayerSkullButtonBuilder clone()
      Overrides:
      clone in class Object