mirror of
https://github.com/PaperMC/Paper.git
synced 2025-02-08 00:21:50 +01:00
Fix dumpitem command not checking sender (#5025)
This commit is contained in:
parent
c92072e21d
commit
23c21fc4bf
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user