GiveCommand: remove useless clone

addItem() clones this anyway.
This commit is contained in:
Dylan K. Taylor 2021-06-30 14:07:58 +01:00
parent f3bd48e6cb
commit a888ab0257
No known key found for this signature in database
GPG Key ID: 8927471A91CAFD3D

View File

@ -89,7 +89,7 @@ class GiveCommand extends VanillaCommand{
}
//TODO: overflow
$player->getInventory()->addItem(clone $item);
$player->getInventory()->addItem($item);
Command::broadcastCommandMessage($sender, new TranslationContainer(KnownTranslationKeys::COMMANDS_GIVE_SUCCESS, [
$item->getName() . " (" . $item->getId() . ":" . $item->getMeta() . ")",