Enum Class SlotStateChannel.Visibility

java.lang.Object
java.lang.Enum<SlotStateChannel.Visibility>
com.trevlar.slotkit.api.state.SlotStateChannel.Visibility
All Implemented Interfaces:
Serializable, Comparable<SlotStateChannel.Visibility>, Constable
Enclosing class:
SlotStateChannel<T>

public static enum SlotStateChannel.Visibility extends Enum<SlotStateChannel.Visibility>
Channel visibility.
  • PRIVATE (the default): each viewer has their own value, keyed by UUID.
  • SHARED: one value per slot for all players, synced to every viewer, and written from a client only by those its SlotStateChannel.CanWrite allows (nobody unless declared). For features that span players, like Inventory Plus's container locks: one player locks slot 5 and every player sees it locked.

SHARED only makes sense on containers that are both multi-player and fixed-slot (a placed shulker, chest or barrel). It means nothing on the ender chest, which is per-player anyway, and does not apply to bundles, which have no fixed slots.

  • Enum Constant Details

  • Method Details

    • values

      public static SlotStateChannel.Visibility[] 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 SlotStateChannel.Visibility 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