Enum Class PlayerConfirmation

java.lang.Object
java.lang.Enum<PlayerConfirmation>
ua.mcchickenstudio.opencreative.utils.PlayerConfirmation
All Implemented Interfaces:
Serializable, Comparable<PlayerConfirmation>, Constable

public enum PlayerConfirmation extends Enum<PlayerConfirmation>

PlayerConfirmation

This enum stores all confirmation types for players, when they have to confirm their action.
  • Enum Constant Details

    • WORLD_NAME_CHANGE

      public static final PlayerConfirmation WORLD_NAME_CHANGE
      When world's owner changes world's name.
    • WORLD_DESCRIPTION_CHANGE

      public static final PlayerConfirmation WORLD_DESCRIPTION_CHANGE
      When world's owner changes world's description.
    • WORLD_CUSTOM_ID_CHANGE

      public static final PlayerConfirmation WORLD_CUSTOM_ID_CHANGE
      When world's owner changes world's custom id.
    • FIND_PLANETS_BY_ID

      public static final PlayerConfirmation FIND_PLANETS_BY_ID
      When player searches worlds by id.
    • FIND_PLANETS_BY_NAME

      public static final PlayerConfirmation FIND_PLANETS_BY_NAME
      When player searches worlds by name.
    • FIND_PLANETS_BY_OWNER

      public static final PlayerConfirmation FIND_PLANETS_BY_OWNER
      When player searches worlds by owner.
    • TRANSFER_OWNERSHIP

      public static final PlayerConfirmation TRANSFER_OWNERSHIP
      When world's owner transfers ownership to other player.
    • GET_OWNERSHIP

      public static final PlayerConfirmation GET_OWNERSHIP
      When new world's owner accepts taking ownership of world.
    • MODULE_NAME_CHANGE

      public static final PlayerConfirmation MODULE_NAME_CHANGE
      When module's owner changes module's display name.
    • MODULE_DESCRIPTION_CHANGE

      public static final PlayerConfirmation MODULE_DESCRIPTION_CHANGE
      When module's owner changes module's description.
    • PROFILE_DESCRIPTION

      public static final PlayerConfirmation PROFILE_DESCRIPTION
      When player changes profile's description.
    • PROFILE_SOCIAL_CHANGE

      public static final PlayerConfirmation PROFILE_SOCIAL_CHANGE
      When player changes profile's social link.
  • Method Details

    • values

      public static PlayerConfirmation[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static PlayerConfirmation valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • setConfirmation

      public static void setConfirmation(@NotNull @NotNull org.bukkit.entity.Player player, @NotNull @NotNull PlayerConfirmation confirmation)
      Sets player's confirmation state to specified type.
      Parameters:
      player - player to set confirmation.
      confirmation - confirmation type to set.
    • setConfirmation

      public static void setConfirmation(@NotNull @NotNull org.bukkit.entity.Player player, @NotNull @NotNull PlayerConfirmation confirmation, @Nullable @Nullable Object data)
      Sets player's confirmation state to specified type.
      Parameters:
      player - player to set confirmation.
      confirmation - confirmation type to set.
      data - additional data.
    • getConfirmation

      @Nullable public static @Nullable PlayerConfirmation getConfirmation(@NotNull @NotNull org.bukkit.entity.Player player)
      Returns player's confirmation type, or null.
      Parameters:
      player - player to get confirmation type.
      Returns:
      confirmation type, or null - if not found.
    • getConfirmationData

      @NotNull public static @NotNull Object getConfirmationData(@NotNull @NotNull org.bukkit.entity.Player player)
      Returns data from player's confirmation state, or empty text "".
      Parameters:
      player - player to get confirmation additional data.
      Returns:
      additional data or empty text "", if not exists.
    • clearConfirmations

      public static void clearConfirmations(@NotNull @NotNull org.bukkit.entity.Player player)
      Removes any confirmation state from player.
      Parameters:
      player - player to clear confirmations.
    • hasConfirmation

      public static boolean hasConfirmation(@NotNull @NotNull org.bukkit.entity.Player player)
      Checks whether player has confirmation state.
      Parameters:
      player - player to check.
      Returns:
      true - player is in confirmation process, false - not.