mirror of
https://github.com/PaperMC/Paper.git
synced 2025-02-16 18:31:53 +01:00
Fix dumpitem command not checking sender (#5025)
This commit is contained in:
parent
c92072e21d
commit
23c21fc4bf
1 changed files with 4 additions and 0 deletions
|
@ -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…
Add table
Reference in a new issue