Class PlayerOpenArenaEditorInSetupGUI.Button

java.lang.Object
de.marcely.bedwars.api.event.player.PlayerOpenArenaEditorInSetupGUI.Button
Enclosing class:
PlayerOpenArenaEditorInSetupGUI

public class PlayerOpenArenaEditorInSetupGUI.Button extends Object
  • Method Details

    • getPlugin

      public Plugin getPlugin()
      Returns the plugin that created this button.
      Returns:
      The creator of this plugin
    • getCategory

      Returns the category in which this button is inside.
      Returns:
      The category of this button
    • getType

      Returns the buttons type.
      Returns:
      The type of the button
    • getListener

      @Nullable public @Nullable ClickListener getListener()
      Returns the listener that handles what will happen when the player clicks on the button.
      Returns:
      The handler of the button
    • getIcon

      @Nullable public @Nullable ItemStack getIcon()
      Returns a clone of the icon. Might be null, used for spliterators.
      Returns:
      The icon of the button
    • setIcon

      public void setIcon(@Nullable @Nullable ItemStack icon)
      Set the icon of the button.

      It's possible to dynamically change the icon by invoking this method.

      Parameters:
      icon - The new icon
    • isVisible

      public boolean isVisible()
      A button may exist in the GUI, but this does not mean that it's actually visible.

      It's possible to dynamically hide and show a button. By this the button disappears as if it has been removed.

      Returns:
      If it's visible or not
    • setVisible

      public void setVisible(boolean visible)
      A button may exist in the GUI, but this does not mean that it's actually visible.

      It's possible to dynamically hide and show a button. By this the button disappears as if it has been removed.

      Parameters:
      visible - If it shall be visible or hidden
    • exists

      public boolean exists()
      Returns whether or not the button still exists on the GUI.

      Keep in mind that this will also return false when the GUI has been disposed. While it may be closed it does not automatically mean that is has been disposed

      Returns:
      If the button still exists internally
    • getEvent

      Returns the event in which this button was constructed.
      Returns:
      The event in which this button was initiated