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

View File

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