geforkt von Mirrors/Paper
Inventory getHolder method without block snapshot
Dieser Commit ist enthalten in:
Ursprung
5b74f31a52
Commit
78acda62f2
@ -34,6 +34,18 @@ public class DoubleChest implements InventoryHolder {
|
|||||||
return inventory.getRightSide().getHolder();
|
return inventory.getRightSide().getHolder();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Paper start - getHolder without snapshot
|
||||||
|
@Nullable
|
||||||
|
public InventoryHolder getLeftSide(boolean useSnapshot) {
|
||||||
|
return inventory.getLeftSide().getHolder(useSnapshot);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Nullable
|
||||||
|
public InventoryHolder getRightSide(boolean useSnapshot) {
|
||||||
|
return inventory.getRightSide().getHolder(useSnapshot);
|
||||||
|
}
|
||||||
|
// Paper end
|
||||||
|
|
||||||
@NotNull
|
@NotNull
|
||||||
public Location getLocation() {
|
public Location getLocation() {
|
||||||
return getInventory().getLocation();
|
return getInventory().getLocation();
|
||||||
|
@ -385,6 +385,17 @@ public interface Inventory extends Iterable<ItemStack> {
|
|||||||
@Nullable
|
@Nullable
|
||||||
public InventoryHolder getHolder();
|
public InventoryHolder getHolder();
|
||||||
|
|
||||||
|
// Paper start - getHolder without snapshot
|
||||||
|
/**
|
||||||
|
* Gets the block or entity belonging to the open inventory
|
||||||
|
*
|
||||||
|
* @param useSnapshot Create a snapshot if the holder is a tile entity
|
||||||
|
* @return The holder of the inventory; null if it has no holder.
|
||||||
|
*/
|
||||||
|
@Nullable
|
||||||
|
public InventoryHolder getHolder(boolean useSnapshot);
|
||||||
|
// Paper end
|
||||||
|
|
||||||
@NotNull
|
@NotNull
|
||||||
@Override
|
@Override
|
||||||
public ListIterator<ItemStack> iterator();
|
public ListIterator<ItemStack> iterator();
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren