From 07e504c37feeff0f997b1064f71bd7850d669294 Mon Sep 17 00:00:00 2001 From: md_5 Date: Sun, 13 Jan 2019 14:10:45 +1100 Subject: [PATCH] Clarify exception thrown when setting drop chance for player inventory --- .../craftbukkit/inventory/CraftInventoryPlayer.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryPlayer.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryPlayer.java index 6cbe069562..2273f213cb 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryPlayer.java @@ -206,7 +206,7 @@ public class CraftInventoryPlayer extends CraftInventory implements org.bukkit.i @Override public void setItemInMainHandDropChance(float chance) { - throw new UnsupportedOperationException(); + throw new UnsupportedOperationException("Cannot set drop chance for PlayerInventory"); } @Override @@ -216,7 +216,7 @@ public class CraftInventoryPlayer extends CraftInventory implements org.bukkit.i @Override public void setItemInOffHandDropChance(float chance) { - throw new UnsupportedOperationException(); + throw new UnsupportedOperationException("Cannot set drop chance for PlayerInventory"); } public float getHelmetDropChance() { @@ -224,7 +224,7 @@ public class CraftInventoryPlayer extends CraftInventory implements org.bukkit.i } public void setHelmetDropChance(float chance) { - throw new UnsupportedOperationException(); + throw new UnsupportedOperationException("Cannot set drop chance for PlayerInventory"); } public float getChestplateDropChance() { @@ -232,7 +232,7 @@ public class CraftInventoryPlayer extends CraftInventory implements org.bukkit.i } public void setChestplateDropChance(float chance) { - throw new UnsupportedOperationException(); + throw new UnsupportedOperationException("Cannot set drop chance for PlayerInventory"); } public float getLeggingsDropChance() { @@ -240,7 +240,7 @@ public class CraftInventoryPlayer extends CraftInventory implements org.bukkit.i } public void setLeggingsDropChance(float chance) { - throw new UnsupportedOperationException(); + throw new UnsupportedOperationException("Cannot set drop chance for PlayerInventory"); } public float getBootsDropChance() { @@ -248,6 +248,6 @@ public class CraftInventoryPlayer extends CraftInventory implements org.bukkit.i } public void setBootsDropChance(float chance) { - throw new UnsupportedOperationException(); + throw new UnsupportedOperationException("Cannot set drop chance for PlayerInventory"); } }