aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorJason Penilla <[email protected]>2024-05-13 22:58:50 -0700
committerJason Penilla <[email protected]>2024-05-13 22:58:50 -0700
commit3fc93581bb876e8149b2ca423375a98f5ca12d27 (patch)
treec2d4bab802402caf58b3f47e08d837597927c689
parent2faa3b2f44c962ce7413e8e3d71e32786851d556 (diff)
downloadPaper-3fc93581bb876e8149b2ca423375a98f5ca12d27.tar.gz
Paper-3fc93581bb876e8149b2ca423375a98f5ca12d27.zip
Show stacktrace when modifyItemStack fails
-rw-r--r--patches/server/0008-CB-fixes.patch13
1 files changed, 13 insertions, 0 deletions
diff --git a/patches/server/0008-CB-fixes.patch b/patches/server/0008-CB-fixes.patch
index 2c625b3d58..cf1e3a6357 100644
--- a/patches/server/0008-CB-fixes.patch
+++ b/patches/server/0008-CB-fixes.patch
@@ -130,6 +130,19 @@ index 905adf97c0d1f0d1c774a6835a5dffcfea884e58..c017ce2ca1bc535795c958a2e509af2a
*/
public class CraftScheduler implements BukkitScheduler {
+diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
+index 2166c420c47778caadf8f3140bbe3aebe06e130f..3b010825028f142c58fad40802c40df62486e903 100644
+--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
++++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
+@@ -243,7 +243,7 @@ public final class CraftMagicNumbers implements UnsafeValues {
+ try {
+ nmsStack.applyComponents(new ItemParser(Commands.createValidationContext(MinecraftServer.getDefaultRegistryAccess())).parse(new StringReader(arguments)).components());
+ } catch (CommandSyntaxException ex) {
+- Logger.getLogger(CraftMagicNumbers.class.getName()).log(Level.SEVERE, null, ex);
++ com.mojang.logging.LogUtils.getClassLogger().error("Exception modifying ItemStack", new Throwable(ex)); // Paper - show stack trace
+ }
+
+ stack.setItemMeta(CraftItemStack.getItemMeta(nmsStack));
diff --git a/src/main/java/org/bukkit/craftbukkit/util/permissions/CraftDefaultPermissions.java b/src/main/java/org/bukkit/craftbukkit/util/permissions/CraftDefaultPermissions.java
index 5ac25dab93fd4c9e9533c80d1ca3d93446d7a365..245ad120a36b6defca7e6889faae1ca5fc33d0c7 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/permissions/CraftDefaultPermissions.java