From 23c21fc4bfe3306c901cb308c85061d694b7a806 Mon Sep 17 00:00:00 2001 From: Josh Roy <10731363+JRoy@users.noreply.github.com> Date: Sun, 10 Jan 2021 20:49:50 -0500 Subject: [PATCH] Fix dumpitem command not checking sender (#5025) --- Spigot-Server-Patches/Paper-dumpitem-command.patch | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Spigot-Server-Patches/Paper-dumpitem-command.patch b/Spigot-Server-Patches/Paper-dumpitem-command.patch index acf32487c..7d1f1c45a 100644 --- a/Spigot-Server-Patches/Paper-dumpitem-command.patch +++ b/Spigot-Server-Patches/Paper-dumpitem-command.patch @@ -51,6 +51,10 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 } + private void doDumpItem(CommandSender sender) { ++ if (!(sender instanceof Player)) { ++ sender.sendMessage("Only players can use this command"); ++ return; ++ } + ItemStack itemInHand = ((CraftPlayer) sender).getItemInHand(); + net.minecraft.server.ItemStack itemStack = CraftItemStack.asNMSCopy(itemInHand); + NBTTagCompound tag = itemStack.getTag();