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

CommandExecutor

Discussion in 'Development' started by RoyalMCPE, Nov 27, 2016.

  1. RoyalMCPE

    RoyalMCPE Slime

    Messages:
    87
    I would like to know how to Execut the command /kit when a player interacts with a sign
     
  2. Primus

    Primus Zombie Pigman

    Messages:
    749
    PHP:
    Server::dispatchCommand(CommandSender $senderstring $commandLine)
    Example
    PHP:
    // Context of PluginBase
    $player $this->getServer()->getPlayer("Steve");
    $this->getServer()->dispatchCommand($player"/me I love this server");
     
  3. Jons

    Jons Spider

    Messages:
    14
    GitHub:
    jonsmc
    You would need to store the sign x, y, z and level somewhere depend on you, i perfer .txt file
    Then on player interact event, check if block is sign and it's x, y, z and level is exists in the place(file) where you store them, then use primus code :)
     
  4. SOFe

    SOFe Administrator Staff Member PMMP Team Poggit Admin

    Messages:
    1,968
    GitHub:
    sof3
    [​IMG]
     
    HimbeersaftLP likes this.
  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.