mirror of
https://github.com/TotalFreedomMC/OpenInv.git
synced 2025-01-03 13:38:21 +00:00
Sneaky tabs, trying to slip in there.
This commit is contained in:
parent
50c45b6616
commit
a802769265
6 changed files with 44 additions and 44 deletions
|
@ -15,7 +15,7 @@
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
<parent>
|
<parent>
|
||||||
|
|
|
@ -42,7 +42,7 @@ public interface IOpenInv {
|
||||||
*
|
*
|
||||||
* @return false unless configured otherwise
|
* @return false unless configured otherwise
|
||||||
*/
|
*/
|
||||||
boolean disableSaving();
|
boolean disableSaving();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the active ISilentContainer implementation. May return null if the server version is
|
* Gets the active ISilentContainer implementation. May return null if the server version is
|
||||||
|
@ -51,35 +51,35 @@ public interface IOpenInv {
|
||||||
* @return the ISilentContainer
|
* @return the ISilentContainer
|
||||||
* @throws IllegalStateException if the server version is unsupported
|
* @throws IllegalStateException if the server version is unsupported
|
||||||
*/
|
*/
|
||||||
IAnySilentContainer getAnySilentContainer();
|
IAnySilentContainer getAnySilentContainer();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets an ISpecialEnderChest for the given Player. Returns null if the ISpecialEnderChest could
|
* Gets an ISpecialEnderChest for the given Player. Returns null if the ISpecialEnderChest could
|
||||||
* not be instantiated.
|
* not be instantiated.
|
||||||
*
|
*
|
||||||
* @deprecated Use {@link IOpenInv#getSpecialEnderChest(Player, boolean)}
|
|
||||||
* @param player the Player
|
* @param player the Player
|
||||||
* @param online true if the Player is currently online
|
* @param online true if the Player is currently online
|
||||||
* @return the ISpecialEnderChest
|
* @return the ISpecialEnderChest
|
||||||
* @throws IllegalStateException if the server version is unsupported
|
* @throws IllegalStateException if the server version is unsupported
|
||||||
|
* @deprecated Use {@link IOpenInv#getSpecialEnderChest(Player, boolean)}
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
@Deprecated
|
||||||
@Nullable
|
@Nullable
|
||||||
ISpecialEnderChest getEnderChest(Player player, boolean online);
|
ISpecialEnderChest getEnderChest(Player player, boolean online);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets an ISpecialPlayerInventory for the given Player. Returns null if the
|
* Gets an ISpecialPlayerInventory for the given Player. Returns null if the
|
||||||
* ISpecialPlayerInventory could not be instantiated.
|
* ISpecialPlayerInventory could not be instantiated.
|
||||||
*
|
*
|
||||||
* @deprecated Use {@link IOpenInv#getSpecialInventory(Player, boolean)}
|
|
||||||
* @param player the Player
|
* @param player the Player
|
||||||
* @param online true if the Player is currently online
|
* @param online true if the Player is currently online
|
||||||
* @return the ISpecialPlayerInventory
|
* @return the ISpecialPlayerInventory
|
||||||
* @throws IllegalStateException if the server version is unsupported
|
* @throws IllegalStateException if the server version is unsupported
|
||||||
|
* @deprecated Use {@link IOpenInv#getSpecialInventory(Player, boolean)}
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
@Deprecated
|
||||||
@Nullable
|
@Nullable
|
||||||
ISpecialPlayerInventory getInventory(Player player, boolean online);
|
ISpecialPlayerInventory getInventory(Player player, boolean online);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the active IInventoryAccess implementation. May return null if the server version is
|
* Gets the active IInventoryAccess implementation. May return null if the server version is
|
||||||
|
@ -88,7 +88,7 @@ public interface IOpenInv {
|
||||||
* @return the IInventoryAccess
|
* @return the IInventoryAccess
|
||||||
* @throws IllegalStateException if the server version is unsupported
|
* @throws IllegalStateException if the server version is unsupported
|
||||||
*/
|
*/
|
||||||
IInventoryAccess getInventoryAccess();
|
IInventoryAccess getInventoryAccess();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the provided player's AnyChest setting.
|
* Gets the provided player's AnyChest setting.
|
||||||
|
@ -97,7 +97,7 @@ public interface IOpenInv {
|
||||||
* @return true if AnyChest is enabled
|
* @return true if AnyChest is enabled
|
||||||
* @throws IllegalStateException if the server version is unsupported
|
* @throws IllegalStateException if the server version is unsupported
|
||||||
*/
|
*/
|
||||||
boolean getPlayerAnyChestStatus(OfflinePlayer player);
|
boolean getPlayerAnyChestStatus(OfflinePlayer player);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets a unique identifier by which the OfflinePlayer can be referenced. Using the value
|
* Gets a unique identifier by which the OfflinePlayer can be referenced. Using the value
|
||||||
|
@ -107,7 +107,7 @@ public interface IOpenInv {
|
||||||
* @return the identifier
|
* @return the identifier
|
||||||
* @throws IllegalStateException if the server version is unsupported
|
* @throws IllegalStateException if the server version is unsupported
|
||||||
*/
|
*/
|
||||||
String getPlayerID(OfflinePlayer offline);
|
String getPlayerID(OfflinePlayer offline);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets a player's SilentChest setting.
|
* Gets a player's SilentChest setting.
|
||||||
|
@ -116,7 +116,7 @@ public interface IOpenInv {
|
||||||
* @return true if SilentChest is enabled
|
* @return true if SilentChest is enabled
|
||||||
* @throws IllegalStateException if the server version is unsupported
|
* @throws IllegalStateException if the server version is unsupported
|
||||||
*/
|
*/
|
||||||
boolean getPlayerSilentChestStatus(OfflinePlayer player);
|
boolean getPlayerSilentChestStatus(OfflinePlayer player);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets an ISpecialEnderChest for the given Player.
|
* Gets an ISpecialEnderChest for the given Player.
|
||||||
|
@ -124,10 +124,10 @@ public interface IOpenInv {
|
||||||
* @param player the Player
|
* @param player the Player
|
||||||
* @param online true if the Player is currently online
|
* @param online true if the Player is currently online
|
||||||
* @return the ISpecialEnderChest
|
* @return the ISpecialEnderChest
|
||||||
* @throws IllegalStateException if the server version is unsupported
|
* @throws IllegalStateException if the server version is unsupported
|
||||||
* @throws InstantiationException if the ISpecialEnderChest could not be instantiated
|
* @throws InstantiationException if the ISpecialEnderChest could not be instantiated
|
||||||
*/
|
*/
|
||||||
ISpecialEnderChest getSpecialEnderChest(Player player, boolean online) throws InstantiationException;
|
ISpecialEnderChest getSpecialEnderChest(Player player, boolean online) throws InstantiationException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets an ISpecialPlayerInventory for the given Player.
|
* Gets an ISpecialPlayerInventory for the given Player.
|
||||||
|
@ -135,17 +135,17 @@ public interface IOpenInv {
|
||||||
* @param player the Player
|
* @param player the Player
|
||||||
* @param online true if the Player is currently online
|
* @param online true if the Player is currently online
|
||||||
* @return the ISpecialPlayerInventory
|
* @return the ISpecialPlayerInventory
|
||||||
* @throws IllegalStateException if the server version is unsupported
|
* @throws IllegalStateException if the server version is unsupported
|
||||||
* @throws InstantiationException if the ISpecialPlayerInventory could not be instantiated
|
* @throws InstantiationException if the ISpecialPlayerInventory could not be instantiated
|
||||||
*/
|
*/
|
||||||
ISpecialPlayerInventory getSpecialInventory(Player player, boolean online) throws InstantiationException;
|
ISpecialPlayerInventory getSpecialInventory(Player player, boolean online) throws InstantiationException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks if the server version is supported by OpenInv.
|
* Checks if the server version is supported by OpenInv.
|
||||||
*
|
*
|
||||||
* @return true if the server version is supported
|
* @return true if the server version is supported
|
||||||
*/
|
*/
|
||||||
boolean isSupportedVersion();
|
boolean isSupportedVersion();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Load a Player from an OfflinePlayer. May return null under some circumstances.
|
* Load a Player from an OfflinePlayer. May return null under some circumstances.
|
||||||
|
@ -155,7 +155,7 @@ public interface IOpenInv {
|
||||||
* @throws IllegalStateException if the server version is unsupported
|
* @throws IllegalStateException if the server version is unsupported
|
||||||
*/
|
*/
|
||||||
@Nullable
|
@Nullable
|
||||||
Player loadPlayer(final OfflinePlayer offline);
|
Player loadPlayer(final OfflinePlayer offline);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get an OfflinePlayer by name.
|
* Get an OfflinePlayer by name.
|
||||||
|
@ -168,7 +168,7 @@ public interface IOpenInv {
|
||||||
* @return the OfflinePlayer with the closest matching name or null if no players have ever logged in
|
* @return the OfflinePlayer with the closest matching name or null if no players have ever logged in
|
||||||
*/
|
*/
|
||||||
@Nullable
|
@Nullable
|
||||||
OfflinePlayer matchPlayer(String name);
|
OfflinePlayer matchPlayer(String name);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Check the configuration value for whether or not OpenInv displays a notification to the user
|
* Check the configuration value for whether or not OpenInv displays a notification to the user
|
||||||
|
@ -176,7 +176,7 @@ public interface IOpenInv {
|
||||||
*
|
*
|
||||||
* @return true unless configured otherwise
|
* @return true unless configured otherwise
|
||||||
*/
|
*/
|
||||||
boolean notifyAnyChest();
|
boolean notifyAnyChest();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Check the configuration value for whether or not OpenInv displays a notification to the user
|
* Check the configuration value for whether or not OpenInv displays a notification to the user
|
||||||
|
@ -184,7 +184,7 @@ public interface IOpenInv {
|
||||||
*
|
*
|
||||||
* @return true unless configured otherwise
|
* @return true unless configured otherwise
|
||||||
*/
|
*/
|
||||||
boolean notifySilentChest();
|
boolean notifySilentChest();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Mark a Player as no longer in use by a Plugin to allow OpenInv to remove it from the cache
|
* Mark a Player as no longer in use by a Plugin to allow OpenInv to remove it from the cache
|
||||||
|
@ -194,7 +194,7 @@ public interface IOpenInv {
|
||||||
* @param plugin the Plugin no longer holding a reference to the Player
|
* @param plugin the Plugin no longer holding a reference to the Player
|
||||||
* @throws IllegalStateException if the server version is unsupported
|
* @throws IllegalStateException if the server version is unsupported
|
||||||
*/
|
*/
|
||||||
void releasePlayer(Player player, Plugin plugin);
|
void releasePlayer(Player player, Plugin plugin);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Mark a Player as in use by a Plugin to prevent it from being removed from the cache. Used to
|
* Mark a Player as in use by a Plugin to prevent it from being removed from the cache. Used to
|
||||||
|
@ -219,7 +219,7 @@ public interface IOpenInv {
|
||||||
* @param plugin the Plugin holding the reference to the Player
|
* @param plugin the Plugin holding the reference to the Player
|
||||||
* @throws IllegalStateException if the server version is unsupported
|
* @throws IllegalStateException if the server version is unsupported
|
||||||
*/
|
*/
|
||||||
void retainPlayer(Player player, Plugin plugin);
|
void retainPlayer(Player player, Plugin plugin);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets a player's AnyChest setting.
|
* Sets a player's AnyChest setting.
|
||||||
|
@ -228,7 +228,7 @@ public interface IOpenInv {
|
||||||
* @param status the status
|
* @param status the status
|
||||||
* @throws IllegalStateException if the server version is unsupported
|
* @throws IllegalStateException if the server version is unsupported
|
||||||
*/
|
*/
|
||||||
void setPlayerAnyChestStatus(OfflinePlayer player, boolean status);
|
void setPlayerAnyChestStatus(OfflinePlayer player, boolean status);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets a player's SilentChest setting.
|
* Sets a player's SilentChest setting.
|
||||||
|
@ -237,7 +237,7 @@ public interface IOpenInv {
|
||||||
* @param status the status
|
* @param status the status
|
||||||
* @throws IllegalStateException if the server version is unsupported
|
* @throws IllegalStateException if the server version is unsupported
|
||||||
*/
|
*/
|
||||||
void setPlayerSilentChestStatus(OfflinePlayer player, boolean status);
|
void setPlayerSilentChestStatus(OfflinePlayer player, boolean status);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Forcibly unload a cached Player's data.
|
* Forcibly unload a cached Player's data.
|
||||||
|
@ -245,6 +245,6 @@ public interface IOpenInv {
|
||||||
* @param player the OfflinePlayer to unload
|
* @param player the OfflinePlayer to unload
|
||||||
* @throws IllegalStateException if the server version is unsupported
|
* @throws IllegalStateException if the server version is unsupported
|
||||||
*/
|
*/
|
||||||
void unload(OfflinePlayer player);
|
void unload(OfflinePlayer player);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,28 +26,28 @@ public interface IAnySilentContainer {
|
||||||
* containers to open, be sure to check {@link #isAnyContainerNeeded(Player, Block)}
|
* containers to open, be sure to check {@link #isAnyContainerNeeded(Player, Block)}
|
||||||
* first.
|
* first.
|
||||||
*
|
*
|
||||||
* @param player the Player opening the container
|
* @param player the Player opening the container
|
||||||
* @param silentchest whether the container's noise is to be silenced
|
* @param silentchest whether the container's noise is to be silenced
|
||||||
* @param block the Block
|
* @param block the Block
|
||||||
* @return true if the container can be opened
|
* @return true if the container can be opened
|
||||||
*/
|
*/
|
||||||
boolean activateContainer(Player player, boolean silentchest, Block block);
|
boolean activateContainer(Player player, boolean silentchest, Block block);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Closes the Player's currently open container silently, if necessary.
|
* Closes the Player's currently open container silently, if necessary.
|
||||||
*
|
*
|
||||||
* @param player the Player closing a container
|
* @param player the Player closing a container
|
||||||
*/
|
*/
|
||||||
void deactivateContainer(Player player);
|
void deactivateContainer(Player player);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks if the container at the given coordinates is blocked.
|
* Checks if the container at the given coordinates is blocked.
|
||||||
*
|
*
|
||||||
* @param player the Player opening the container
|
* @param player the Player opening the container
|
||||||
* @param block the Block
|
* @param block the Block
|
||||||
* @return true if the container is blocked
|
* @return true if the container is blocked
|
||||||
*/
|
*/
|
||||||
boolean isAnyContainerNeeded(Player player, Block block);
|
boolean isAnyContainerNeeded(Player player, Block block);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks if the given block is a container which can be unblocked or silenced.
|
* Checks if the given block is a container which can be unblocked or silenced.
|
||||||
|
@ -55,6 +55,6 @@ public interface IAnySilentContainer {
|
||||||
* @param block the BlockState
|
* @param block the BlockState
|
||||||
* @return true if the Block is a supported container
|
* @return true if the Block is a supported container
|
||||||
*/
|
*/
|
||||||
boolean isAnySilentContainer(Block block);
|
boolean isAnySilentContainer(Block block);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,7 +30,7 @@ public interface IInventoryAccess {
|
||||||
* @return the ISpecialEnderChest or null
|
* @return the ISpecialEnderChest or null
|
||||||
*/
|
*/
|
||||||
@Nullable
|
@Nullable
|
||||||
ISpecialEnderChest getSpecialEnderChest(Inventory inventory);
|
ISpecialEnderChest getSpecialEnderChest(Inventory inventory);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets an ISpecialPlayerInventory from an Inventory or null if the Inventory is not backed by
|
* Gets an ISpecialPlayerInventory from an Inventory or null if the Inventory is not backed by
|
||||||
|
@ -40,7 +40,7 @@ public interface IInventoryAccess {
|
||||||
* @return the ISpecialPlayerInventory or null
|
* @return the ISpecialPlayerInventory or null
|
||||||
*/
|
*/
|
||||||
@Nullable
|
@Nullable
|
||||||
ISpecialPlayerInventory getSpecialPlayerInventory(Inventory inventory);
|
ISpecialPlayerInventory getSpecialPlayerInventory(Inventory inventory);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Check if an Inventory is an ISpecialEnderChest implementation.
|
* Check if an Inventory is an ISpecialEnderChest implementation.
|
||||||
|
@ -48,7 +48,7 @@ public interface IInventoryAccess {
|
||||||
* @param inventory the Inventory
|
* @param inventory the Inventory
|
||||||
* @return true if the Inventory is backed by an ISpecialEnderChest
|
* @return true if the Inventory is backed by an ISpecialEnderChest
|
||||||
*/
|
*/
|
||||||
boolean isSpecialEnderChest(Inventory inventory);
|
boolean isSpecialEnderChest(Inventory inventory);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Check if an Inventory is an ISpecialPlayerInventory implementation.
|
* Check if an Inventory is an ISpecialPlayerInventory implementation.
|
||||||
|
@ -56,6 +56,6 @@ public interface IInventoryAccess {
|
||||||
* @param inventory the Inventory
|
* @param inventory the Inventory
|
||||||
* @return true if the Inventory is backed by an ISpecialPlayerInventory
|
* @return true if the Inventory is backed by an ISpecialPlayerInventory
|
||||||
*/
|
*/
|
||||||
boolean isSpecialPlayerInventory(Inventory inventory);
|
boolean isSpecialPlayerInventory(Inventory inventory);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,25 +26,25 @@ public interface ISpecialEnderChest {
|
||||||
*
|
*
|
||||||
* @return the Inventory
|
* @return the Inventory
|
||||||
*/
|
*/
|
||||||
Inventory getBukkitInventory();
|
Inventory getBukkitInventory();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the Player associated with this ISpecialEnderChest online.
|
* Sets the Player associated with this ISpecialEnderChest online.
|
||||||
*
|
*
|
||||||
* @param player the Player coming online
|
* @param player the Player coming online
|
||||||
*/
|
*/
|
||||||
void setPlayerOnline(Player player);
|
void setPlayerOnline(Player player);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the Player associated with this ISpecialEnderChest offline.
|
* Sets the Player associated with this ISpecialEnderChest offline.
|
||||||
*/
|
*/
|
||||||
void setPlayerOffline();
|
void setPlayerOffline();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets whether or not this ISpecialEnderChest is in use.
|
* Gets whether or not this ISpecialEnderChest is in use.
|
||||||
*
|
*
|
||||||
* @return true if the ISpecialEnderChest is in use
|
* @return true if the ISpecialEnderChest is in use
|
||||||
*/
|
*/
|
||||||
boolean isInUse();
|
boolean isInUse();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,25 +26,25 @@ public interface ISpecialPlayerInventory {
|
||||||
*
|
*
|
||||||
* @return the Inventory
|
* @return the Inventory
|
||||||
*/
|
*/
|
||||||
Inventory getBukkitInventory();
|
Inventory getBukkitInventory();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the Player associated with this ISpecialPlayerInventory online.
|
* Sets the Player associated with this ISpecialPlayerInventory online.
|
||||||
*
|
*
|
||||||
* @param player the Player coming online
|
* @param player the Player coming online
|
||||||
*/
|
*/
|
||||||
void setPlayerOnline(Player player);
|
void setPlayerOnline(Player player);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the Player associated with this ISpecialPlayerInventory offline.
|
* Sets the Player associated with this ISpecialPlayerInventory offline.
|
||||||
*/
|
*/
|
||||||
void setPlayerOffline();
|
void setPlayerOffline();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets whether or not this ISpecialPlayerInventory is in use.
|
* Gets whether or not this ISpecialPlayerInventory is in use.
|
||||||
*
|
*
|
||||||
* @return true if the ISpecialPlayerInventory is in use
|
* @return true if the ISpecialPlayerInventory is in use
|
||||||
*/
|
*/
|
||||||
boolean isInUse();
|
boolean isInUse();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue