Scissors/patches/server/0007-Removes-useless-spammy-error-logging.patch
2022-05-01 14:13:14 -05:00

29 lines
1.4 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Video <videogamesm12@gmail.com>
Date: Sun, 13 Mar 2022 07:47:20 -0600
Subject: [PATCH] Removes useless spammy error logging
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
index 5607dc10dc1c9d2dbf4e3007890e5e89a175605e..bc30df2009cf0d8edf0040f6fe16587d109cebdb 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
@@ -1769,6 +1769,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
try {
blockParser = blockParser.parse(false);
} catch (com.mojang.brigadier.exceptions.CommandSyntaxException e) {
+ // Scissors - Don't log errors thrown by Brigadier when an error is thrown
return null;
}
@@ -1794,8 +1795,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
resource = CraftNamespacedKey.fromMinecraft(key);
}
} catch (IllegalArgumentException ex) {
- org.bukkit.Bukkit.getLogger().warning("Namespaced resource does not validate: " + key.toString());
- ex.printStackTrace();
+ // Scissors - Don't log errors thrown by invalid namespaces when an error is thrown
}
return resource;