Is it able to set a item popup ? If not could you cancel the item popup and make a popup to overwrite? Like a diamond sword an when you hold it it says diamond sword but could i cancel that popup and make slaping diamond out of it ? So if you tap it it now says slaping diamond
Now im not sure how to cancel item popup or if its possible but ive done a similar effect use PlayerItemHeldEvent and if its a certain item i send a normal popup to the player. The real item name shows up for like a split second tho but it works pretty well as i use it on a server.
Here it looks weird cause i wrote it on my phone so.. yea PHP: public function playerItemHeld(PlayerItemHeldEvent $ev){ $item = $ev->getItem(); $player = $ev->getPlayer(); if ($item instanceof Item){ switch ($item->getId()){ case 296: $player->sendPopup("Name"); break; } } }
Note that there is still a few hundreds of milliseconds before the popup is shown, so don't expect the real item name to be completely hidden.
i know but in 0.12.0 will be anvil and changable item names so will be description under item name avalaible too?
But you can make the description easily when the client's popup has overridden with a popup or a tip (so it will be up). obviously will be on the hotbar or just up it but it can be done with a "\n"