Fix API side of resizing barrels and ender chests

This commit is contained in:
William Blake Galbreath
2019-07-23 07:08:07 -05:00
parent 609a9b2637
commit 3c29e21f2f
13 changed files with 154 additions and 55 deletions

View File

@@ -0,0 +1,38 @@
From 32525a0275809f982d4a3bd9dbc37d760198aa26 Mon Sep 17 00:00:00 2001
From: William Blake Galbreath <blake.galbreath@gmail.com>
Date: Tue, 23 Jul 2019 06:50:55 -0500
Subject: [PATCH] Allow inventory resizing
---
.../java/org/bukkit/event/inventory/InventoryType.java | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/src/main/java/org/bukkit/event/inventory/InventoryType.java b/src/main/java/org/bukkit/event/inventory/InventoryType.java
index 75e719ae8..fb7abc2a5 100644
--- a/src/main/java/org/bukkit/event/inventory/InventoryType.java
+++ b/src/main/java/org/bukkit/event/inventory/InventoryType.java
@@ -128,7 +128,7 @@ public enum InventoryType {
STONECUTTER(2, "Stonecutter")
;
- private final int size;
+ private int size; // Purpur - remove final
private final String title;
private final boolean isCreatable;
@@ -142,6 +142,12 @@ public enum InventoryType {
this.isCreatable = isCreatable;
}
+ // Purpur start
+ public void setDefaultSize(int size) {
+ this.size = size;
+ }
+ // Purpur end
+
public int getDefaultSize() {
return size;
}
--
2.20.1