From d6c970b00b2698948818b9d3cb6660e744a79bd9 Mon Sep 17 00:00:00 2001 From: CraftBukkit/Spigot Date: Wed, 23 Oct 2024 07:30:39 +1100 Subject: [PATCH] SPIGOT-7918: Make error message clearer for slot types not present in player inventories By: md_5 --- .../bukkit/craftbukkit/inventory/CraftInventoryPlayer.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryPlayer.java b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryPlayer.java index 4479cdf926..88327c35a5 100644 --- a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryPlayer.java +++ b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryPlayer.java @@ -136,7 +136,7 @@ public class CraftInventoryPlayer extends CraftInventory implements org.bukkit.i this.setHelmet(item); break; default: - throw new IllegalArgumentException("Not implemented. This is a bug"); + throw new IllegalArgumentException("Could not set slot " + slot + " - not a valid slot for PlayerInventory"); } } @@ -163,7 +163,7 @@ public class CraftInventoryPlayer extends CraftInventory implements org.bukkit.i case HEAD: return getHelmet(); default: - throw new IllegalArgumentException("Not implemented. This is a bug"); + throw new IllegalArgumentException("Could not get slot " + slot + " - not a valid slot for PlayerInventory"); } }