Created
August 18, 2020 04:58
-
-
Save k-kawaa/37f80a1d2694cb320e2e54ad89c7f8e5 to your computer and use it in GitHub Desktop.
手に持っているアイテムの名前を変更する
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| 'rename': | |
| $inventory = $sender->getInventory(); | |
| $item = $inventory->getItemInHand(); | |
| $index = $inventory->getHeldItemIndex(); | |
| $item->setCustomName($args[0]); | |
| $inventory->setItem($index, $item); | |
| return true; | |
| break; | |
| ///例としてcommandで/rename args[0]の場合 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment