Prep for silent shulker boxes, backport ocelot fix to all versions
No clue why I didn't port it to all versions, seems like I stopped after 1.8 or something. Ocelots have been around since 1.2.
This commit is contained in:
@@ -18,8 +18,22 @@ package com.lishid.openinv.internal;
|
||||
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
/**
|
||||
* @deprecated Use {@link IAnySilentContainer}
|
||||
*/
|
||||
@Deprecated
|
||||
public interface IAnySilentChest {
|
||||
|
||||
/**
|
||||
* @deprecated Use {@link IAnySilentContainer#activateContainer(Player, boolean, boolean, int, int, int)}.
|
||||
*/
|
||||
@Deprecated
|
||||
public boolean activateChest(Player player, boolean anychest, boolean silentchest, int x, int y, int z);
|
||||
|
||||
/**
|
||||
* @deprecated Use {@link IAnySilentContainer#isAnyContainerNeeded(Player, int, int, int)}.
|
||||
*/
|
||||
@Deprecated
|
||||
public boolean isAnyChestNeeded(Player player, int x, int y, int z);
|
||||
|
||||
public boolean activateChest(Player player, boolean anychest, boolean silentchest, int x, int y, int z);
|
||||
}
|
||||
|
@@ -0,0 +1,40 @@
|
||||
package com.lishid.openinv.internal;
|
||||
|
||||
import org.bukkit.block.Block;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
public interface IAnySilentContainer extends IAnySilentChest {
|
||||
|
||||
/**
|
||||
* Checks if the given Block is a container which can be unblocked or silenced.
|
||||
*
|
||||
* @param block the Block
|
||||
* @return true if the Block is a supported container
|
||||
*/
|
||||
public boolean isAnySilentContainer(Block block);
|
||||
|
||||
/**
|
||||
* Opens the container at the given coordinates for the Player.
|
||||
*
|
||||
* @param player
|
||||
* @param anychest whether compatibility for blocked containers is to be used
|
||||
* @param silentchest whether the container's noise is to be silenced
|
||||
* @param x the x coordinate
|
||||
* @param y the y coordinate
|
||||
* @param z the z coordinate
|
||||
* @return true if the container can be opened
|
||||
*/
|
||||
public boolean activateContainer(Player player, boolean anychest, boolean silentchest, int x, int y, int z);
|
||||
|
||||
/**
|
||||
* Checks if the container at the given coordinates is blocked.
|
||||
*
|
||||
* @param player the Player opening the container
|
||||
* @param x the x coordinate
|
||||
* @param y the y coordinate
|
||||
* @param z the z coordinate
|
||||
* @return true if the container is blocked
|
||||
*/
|
||||
public boolean isAnyContainerNeeded(Player player, int x, int y, int z);
|
||||
|
||||
}
|
@@ -20,5 +20,14 @@ import org.bukkit.entity.HumanEntity;
|
||||
import org.bukkit.inventory.Inventory;
|
||||
|
||||
public interface IInventoryAccess {
|
||||
|
||||
/**
|
||||
* Check if an entity has permission to modify the contents of an inventory.
|
||||
*
|
||||
* @param inventory the Inventory
|
||||
* @param player the HumanEntity
|
||||
* @return true if the HumanEntity can modify the Inventory
|
||||
*/
|
||||
public boolean check(Inventory inventory, HumanEntity player);
|
||||
|
||||
}
|
||||
|
@@ -21,6 +21,11 @@ import org.bukkit.inventory.Inventory;
|
||||
|
||||
public interface ISpecialEnderChest {
|
||||
|
||||
/**
|
||||
* Gets the Inventory associated with this ISpecialEnderChest.
|
||||
*
|
||||
* @return the Inventory
|
||||
*/
|
||||
public Inventory getBukkitInventory();
|
||||
|
||||
/**
|
||||
|
@@ -21,6 +21,11 @@ import org.bukkit.inventory.Inventory;
|
||||
|
||||
public interface ISpecialPlayerInventory {
|
||||
|
||||
/**
|
||||
* Gets the Inventory associated with this ISpecialPlayerInventory.
|
||||
*
|
||||
* @return the Inventory
|
||||
*/
|
||||
public Inventory getBukkitInventory();
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user