Class CreationOptions<Slot>

java.lang.Object
com.janboerman.invsee.spigot.api.CreationOptions<Slot>
Type Parameters:
Slot - the spectator inventory slot type. Usually PlayerInventorySlot or EnderChestSlot.
All Implemented Interfaces:
Cloneable

public class CreationOptions<Slot> extends Object implements Cloneable
Options used to customise how SpectatorInventorys are opened.
  • Method Details

    • of

      public static <Slot> CreationOptions<Slot> of(Plugin plugin, Title title, boolean offlinePlayerSupport, Mirror<Slot> mirror, boolean unknownPlayerSupport, boolean bypassExempt, LogOptions logOptions, PlaceholderPalette placeholderPalette)
      Create new CreationOptions.
      Type Parameters:
      Slot - the slot type
      Parameters:
      plugin - the plugin which wants to create the SpectatorInventory
      title - the title of the SpectatorInventory
      offlinePlayerSupport - whether offline players can be spectated
      mirror - the mirror which to view items through
      unknownPlayerSupport - whether unknown players can be spectated
      bypassExempt - whether exempted players can be spectated
      logOptions - the logging options used by the created SpectatorInventoryView.
      placeholderPalette - the placeholder palette
      Returns:
      new creation options
    • of

      @Deprecated public static <Slot> CreationOptions<Slot> of(Title title, boolean offlinePlayerSupport, Mirror<Slot> mirror, boolean unknownPlayerSupport) throws Exception
      Deprecated.
      Throws:
      Exception
    • of

      @Deprecated public static <Slot> CreationOptions<Slot> of(Title title, boolean offlinePlayerSupport, Mirror<Slot> mirror, boolean unknownPlayerSupport, boolean bypassExempt) throws Exception
      Deprecated.
      Throws:
      Exception
    • of

      @Deprecated public static <Slot> CreationOptions<Slot> of(Plugin plugin, Title title, boolean offlinePlayerSupport, Mirror<Slot> mirror, boolean unknownPlayerSupport, boolean bypassExempt, LogOptions logOptions)
      Deprecated.
    • defaultMainInventory

      @Deprecated public static CreationOptions<PlayerInventorySlot> defaultMainInventory()
      Deprecated.
    • defaultMainInventory

      public static CreationOptions<PlayerInventorySlot> defaultMainInventory(Plugin plugin)
      Get default creation options
      Parameters:
      plugin - the plugin which wants to create MainSpectatorInventorys.
      Returns:
      new creation options
    • defaultEnderInventory

      @Deprecated public static CreationOptions<EnderChestSlot> defaultEnderInventory()
      Deprecated.
    • defaultEnderInventory

      public static CreationOptions<EnderChestSlot> defaultEnderInventory(Plugin plugin)
      Get default creation options
      Parameters:
      plugin - the plugin which wants to create EnderSpectatorInventorys.
      Returns:
      new creation options
    • clone

      public CreationOptions<Slot> clone()
      Creates a deep copy of these creation options.
      Overrides:
      clone in class Object
      Returns:
      new creation options with the same configured values as this one
    • withPlugin

      public CreationOptions<Slot> withPlugin(Plugin plugin)
      Set the plugin.
      Parameters:
      plugin - the plugin
      Returns:
      this
    • withTitle

      public CreationOptions<Slot> withTitle(Title title)
      Set the title.
      Parameters:
      title - the title
      Returns:
      this
    • withTitle

      public CreationOptions<Slot> withTitle(String title)
      Set the title.
      Parameters:
      title - the title
      Returns:
      this
    • withOfflinePlayerSupport

      public CreationOptions<Slot> withOfflinePlayerSupport(boolean offlinePlayerSupport)
      Set offline player support.
      Parameters:
      offlinePlayerSupport - true if offline players must be able to be spectated, otherwise false
      Returns:
      this
    • withMirror

      public CreationOptions<Slot> withMirror(Mirror<Slot> mirror)
      Set the mirror.
      Parameters:
      mirror - the mirror
      Returns:
      this
    • withUnknownPlayerSupport

      public CreationOptions<Slot> withUnknownPlayerSupport(boolean unknownPlayerSupport)
      Set unknown player support.
      Parameters:
      unknownPlayerSupport - true if players who have not played on the server before must be able to be spectated, otherwise false
      Returns:
      this
    • withBypassExemptedPlayers

      public CreationOptions<Slot> withBypassExemptedPlayers(boolean bypassExemptedPlayers)
      Set exemption bypass.
      Parameters:
      bypassExemptedPlayers - true if exempted players can still be spectated, false if exempted players cannot be spectated
      Returns:
      this
    • withLogOptions

      public CreationOptions<Slot> withLogOptions(LogOptions logOptions)
      Set the logging options.
      Parameters:
      logOptions - the logging options
      Returns:
      this
    • withPlaceholderPalette

      public CreationOptions<Slot> withPlaceholderPalette(PlaceholderPalette placeholderPalette)
      Set the placeholder palette.
      Parameters:
      placeholderPalette - the placeholder palette
      Returns:
      this
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getPlugin

      public Plugin getPlugin()
      Get the configured plugin.
    • getTitle

      public Title getTitle()
      Get the configured title.
    • isOfflinePlayerSupported

      public boolean isOfflinePlayerSupported()
      Get the configured support for offline players.
    • getMirror

      public Mirror<Slot> getMirror()
      Get the configured mirror.
    • isUnknownPlayerSupported

      public boolean isUnknownPlayerSupported()
      Get the configured support for unknown players.
    • canBypassExemptedPlayers

      public boolean canBypassExemptedPlayers()
      Get whether exempted players can still be spectated.
    • getLogOptions

      public LogOptions getLogOptions()
      Get the logging options
    • getPlaceholderPalette

      public PlaceholderPalette getPlaceholderPalette()
      Get the placeholder palette