geforkt von Mirrors/Paper
59 Zeilen
2.1 KiB
Diff
59 Zeilen
2.1 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Jake Potrebic <jake.m.potrebic@gmail.com>
|
|
Date: Tue, 14 Mar 2023 18:55:47 -0700
|
|
Subject: [PATCH] Fix Jukeboxes
|
|
|
|
|
|
diff --git a/src/main/java/org/bukkit/block/Jukebox.java b/src/main/java/org/bukkit/block/Jukebox.java
|
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
|
--- a/src/main/java/org/bukkit/block/Jukebox.java
|
|
+++ b/src/main/java/org/bukkit/block/Jukebox.java
|
|
@@ -0,0 +0,0 @@ import org.jetbrains.annotations.Nullable;
|
|
/**
|
|
* Represents a captured state of a jukebox.
|
|
*/
|
|
-public interface Jukebox extends TileState {
|
|
+public interface Jukebox extends TileState, org.bukkit.inventory.BlockInventoryHolder { // Paper
|
|
|
|
/**
|
|
* Gets the record inserted into the jukebox.
|
|
@@ -0,0 +0,0 @@ public interface Jukebox extends TileState {
|
|
* @throws IllegalStateException if this block state is not placed
|
|
*/
|
|
public boolean eject();
|
|
+ // Paper start
|
|
+ /**
|
|
+ * @return inventory
|
|
+ * @see Container#getInventory()
|
|
+ */
|
|
+ @NotNull
|
|
+ @Override
|
|
+ org.bukkit.inventory.Inventory getInventory();
|
|
+
|
|
+ /**
|
|
+ * @return snapshot inventory
|
|
+ * @see Container#getSnapshotInventory()
|
|
+ */
|
|
+ @NotNull
|
|
+ org.bukkit.inventory.Inventory getSnapshotInventory();
|
|
+ // Paper end
|
|
}
|
|
diff --git a/src/main/java/org/bukkit/event/inventory/InventoryType.java b/src/main/java/org/bukkit/event/inventory/InventoryType.java
|
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
|
--- a/src/main/java/org/bukkit/event/inventory/InventoryType.java
|
|
+++ b/src/main/java/org/bukkit/event/inventory/InventoryType.java
|
|
@@ -0,0 +0,0 @@ public enum InventoryType {
|
|
*/
|
|
@Deprecated @org.jetbrains.annotations.ApiStatus.Experimental // Paper - 1.20
|
|
SMITHING_NEW(4, "Upgrade Gear"),
|
|
+ // Paper start
|
|
+ /**
|
|
+ * Pseudo jukebox inventory
|
|
+ */
|
|
+ @org.jetbrains.annotations.ApiStatus.Experimental
|
|
+ JUKEBOX(1, "Jukebox");
|
|
+ // Paper end
|
|
;
|
|
|
|
private final int size;
|