Hi guys how i can add to a player inventory some enchanted or renamed items? Not with /give, its for a plugin
thank's gamecrafter . but if I want to see if a player have the renamed item in the hand what i have to do?
Check $item->getName()? BTW, remember that you should avoid using $server->dispatchCommand() for executing commands that you wrote instead of from direct player input.