1. The forums will be archived and moved to a read only mode in about 2 weeks (mid march).

RenameItem

Discussion in 'Development' started by JblusMC, Aug 22, 2018.

  1. JblusMC

    JblusMC Spider

    Messages:
    14
    hello, I would like to know how to make sure that any person holds an Item in the hand this one and will be famous
     
  2. MalakasPlayzMCPE

    MalakasPlayzMCPE Zombie Pigman

    Messages:
    667
    Bad English...
    PHP:
    $itemIdGoesHere 5;
    foreach(
    $this->getServer()->getOnlinePlayers() as $player){
        if(
    $player->getInventory()->getItemInHand()->getId() === $itemIdGoesHere){
            
    $player->sendMessage("You are famous");
        }
    }
     
  3. HimbeersaftLP

    HimbeersaftLP Fish

    Messages:
    2,402
    GitHub:
    HimbeersaftLP
    I don't quite get that part
     
    OnTheVerge and RumDaDuMCPE like this.
  4. RumDaDuMCPE

    RumDaDuMCPE Witch

    Messages:
    67
    GitHub:
    RumDaDuMCPE
    Guess he means that this sorta plugin's ought to be famous? Yeah, I got no idea either.
     
    OnTheVerge likes this.
  5. 7awariGamer

    7awariGamer Baby Zombie

    Messages:
    120
    GitHub:
    7awariGamer
    I don't understand bro
     
  6. AkmalFairuz

    AkmalFairuz Spider Jockey

    Messages:
    25
    GitHub:
    akmalfairuz
    PHP:
    use pocketmine\item\Item;
    PHP:
    $name "Enter Custom Name here!";
    $item Item::get(Item::DIAMOND_SWORD);
    $item->setCustomName($name);
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.