Package com.janboerman.invsee.spigot.api
Class CreationOptions<Slot>
java.lang.Object
com.janboerman.invsee.spigot.api.CreationOptions<Slot>
- Type Parameters:
Slot
- the spectator inventory slot type. UsuallyPlayerInventorySlot
orEnderChestSlot
.
- All Implemented Interfaces:
Cloneable
Options used to customise how
SpectatorInventory
s are opened.-
Method Summary
Modifier and TypeMethodDescriptionboolean
Get whether exempted players can still be spectated.clone()
Creates a deep copy of these creation options.static CreationOptions
<EnderChestSlot> Deprecated.static CreationOptions
<EnderChestSlot> defaultEnderInventory
(Plugin plugin) Get default creation optionsstatic CreationOptions
<PlayerInventorySlot> Deprecated.static CreationOptions
<PlayerInventorySlot> defaultMainInventory
(Plugin plugin) Get default creation optionsboolean
Get the logging optionsGet the configured mirror.Get the placeholder paletteGet the configured plugin.getTitle()
Get the configured title.int
hashCode()
boolean
Get the configured support for offline players.boolean
Get the configured support for unknown players.static <Slot> CreationOptions
<Slot> Deprecated.static <Slot> CreationOptions
<Slot> of
(Title title, boolean offlinePlayerSupport, Mirror<Slot> mirror, boolean unknownPlayerSupport, boolean bypassExempt) Deprecated.static <Slot> CreationOptions
<Slot> of
(Plugin plugin, Title title, boolean offlinePlayerSupport, Mirror<Slot> mirror, boolean unknownPlayerSupport, boolean bypassExempt, LogOptions logOptions) Deprecated.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.toString()
withBypassExemptedPlayers
(boolean bypassExemptedPlayers) Set exemption bypass.withLogOptions
(LogOptions logOptions) Set the logging options.withMirror
(Mirror<Slot> mirror) Set the mirror.withOfflinePlayerSupport
(boolean offlinePlayerSupport) Set offline player support.withPlaceholderPalette
(PlaceholderPalette placeholderPalette) Set the placeholder palette.withPlugin
(Plugin plugin) Set the plugin.Set the title.Set the title.withUnknownPlayerSupport
(boolean unknownPlayerSupport) Set unknown player support.
-
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 SpectatorInventorytitle
- the title of the SpectatorInventoryofflinePlayerSupport
- whether offline players can be spectatedmirror
- the mirror which to view items throughunknownPlayerSupport
- whether unknown players can be spectatedbypassExempt
- whether exempted players can be spectatedlogOptions
- the logging options used by the createdSpectatorInventoryView
.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. -
defaultMainInventory
Get default creation options- Parameters:
plugin
- the plugin which wants to create MainSpectatorInventorys.- Returns:
- new creation options
-
defaultEnderInventory
Deprecated. -
defaultEnderInventory
Get default creation options- Parameters:
plugin
- the plugin which wants to create EnderSpectatorInventorys.- Returns:
- new creation options
-
clone
Creates a deep copy of these creation options. -
withPlugin
Set the plugin.- Parameters:
plugin
- the plugin- Returns:
- this
-
withTitle
Set the title.- Parameters:
title
- the title- Returns:
- this
-
withTitle
Set the title.- Parameters:
title
- the title- Returns:
- this
-
withOfflinePlayerSupport
Set offline player support.- Parameters:
offlinePlayerSupport
- true if offline players must be able to be spectated, otherwise false- Returns:
- this
-
withMirror
Set the mirror.- Parameters:
mirror
- the mirror- Returns:
- this
-
withUnknownPlayerSupport
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
Set exemption bypass.- Parameters:
bypassExemptedPlayers
- true if exempted players can still be spectated, false if exempted players cannot be spectated- Returns:
- this
-
withLogOptions
Set the logging options.- Parameters:
logOptions
- the logging options- Returns:
- this
-
withPlaceholderPalette
Set the placeholder palette.- Parameters:
placeholderPalette
- the placeholder palette- Returns:
- this
-
equals
-
hashCode
-
toString
-
getPlugin
Get the configured plugin. -
getTitle
Get the configured title. -
isOfflinePlayerSupported
public boolean isOfflinePlayerSupported()Get the configured support for offline players. -
getMirror
-
isUnknownPlayerSupported
public boolean isUnknownPlayerSupported()Get the configured support for unknown players. -
canBypassExemptedPlayers
public boolean canBypassExemptedPlayers()Get whether exempted players can still be spectated. -
getLogOptions
Get the logging options -
getPlaceholderPalette
Get the placeholder palette
-