Files
Purpur/patches/api/0004-Allow-inventory-resizing.patch
jmp b538cd9fba Updated Upstream (Paper)
Upstream has released updates that appear to apply and compile correctly

Paper Changes:
466820160 Upstream Update (#5211)
2a0ee4b65 Add support for hex color codes in console
4e958e229 We're going on an Adventure! (#4842)
1a9735611 Stop loop when flags set to false (#5101)
a5928db4a [Auto] Updated Upstream (CraftBukkit)
2021-02-21 13:46:04 -08:00

33 lines
1.1 KiB
Diff

From 0000000000000000000000000000000000000000 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
diff --git a/src/main/java/org/bukkit/event/inventory/InventoryType.java b/src/main/java/org/bukkit/event/inventory/InventoryType.java
index 090d22bd30f7947103771aaaf09a2398970ac337..ca660dde2010098e8c77141d05c2d4d5470adf81 100644
--- a/src/main/java/org/bukkit/event/inventory/InventoryType.java
+++ b/src/main/java/org/bukkit/event/inventory/InventoryType.java
@@ -132,7 +132,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;
@@ -159,6 +159,12 @@ public enum InventoryType {
this.defaultTitleComponent = net.kyori.adventure.text.Component.text(defaultTitle); // Paper - Adventure
}
+ // Purpur start
+ public void setDefaultSize(int size) {
+ this.size = size;
+ }
+ // Purpur end
+
public int getDefaultSize() {
return size;
}