Prepare for 1.14

To continue providing renamed ender chests/player inventories we can no longer just provide an Inventory, a full InventoryView is required. To avoid confusion the old method has been removed entirely, leading to a major API revision bump.
This commit is contained in:
Jikoo
2019-04-28 20:37:05 -04:00
parent adc35e9ad5
commit 9e37cbbca8
173 changed files with 2572 additions and 1911 deletions

View File

@@ -18,6 +18,7 @@ package com.lishid.openinv.internal;
import org.bukkit.block.Block;
import org.bukkit.entity.Player;
import org.jetbrains.annotations.NotNull;
public interface IAnySilentContainer {
@@ -26,19 +27,19 @@ public interface IAnySilentContainer {
* containers to open, be sure to check {@link #isAnyContainerNeeded(Player, Block)}
* first.
*
* @param player the Player opening the container
* @param silentchest whether the container's noise is to be silenced
* @param block the Block
* @param player the Player opening the container
* @param silent whether the container's noise is to be silenced
* @param block the Block
* @return true if the container can be opened
*/
boolean activateContainer(Player player, boolean silentchest, Block block);
boolean activateContainer(@NotNull Player player, boolean silent, @NotNull Block block);
/**
* Closes the Player's currently open container silently, if necessary.
*
* @param player the Player closing a container
*/
void deactivateContainer(Player player);
void deactivateContainer(@NotNull Player player);
/**
* Checks if the container at the given coordinates is blocked.
@@ -47,7 +48,7 @@ public interface IAnySilentContainer {
* @param block the Block
* @return true if the container is blocked
*/
boolean isAnyContainerNeeded(Player player, Block block);
boolean isAnyContainerNeeded(@NotNull Player player, @NotNull Block block);
/**
* Checks if the given block is a container which can be unblocked or silenced.
@@ -55,6 +56,6 @@ public interface IAnySilentContainer {
* @param block the BlockState
* @return true if the Block is a supported container
*/
boolean isAnySilentContainer(Block block);
boolean isAnySilentContainer(@NotNull Block block);
}