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

Command not working.

Discussion in 'Facepalm' started by RumDaDuMCPE, Jul 29, 2017.

  1. RumDaDuMCPE

    RumDaDuMCPE Witch

    Messages:
    67
    GitHub:
    RumDaDuMCPE
    When the command /kitpvp is executed, the only feedback I get is "Usage: /kitpvp"
    PHP:
    <?php

    namespace RumDaDuMCPE;

    use 
    pocketmine\command\{CommandSenderCommand};

    class 
    Main extends \pocketmine\plugin\PluginBase {

    public function 
    execute(CommandSender $playerCommand $cmd, array $args$label) {
    switch (
    $cmd->getName()) {
    case 
    "kitpvp":
    $player->addTitle("§l§6RumBenCraft""§a>> §l§eConnecting to Kit-PvP §r§a<<"58020);$packet = new \pocketmine\network\mcpe\protocol\TransferPacket();
    $packet->address "here.there.what";
    $packet->port 10;
    $player->dataPacket($packet);
    return 
    true;
    }
    }
    }
    name: Sub-Servers
    version: "1"
    author: RumDaDuMCPE
    api: [3.0.0-ALPHA6, 3.0.0-ALPHA5, 3.0.0-ALPHA7]
    main: RumDaDuMCPE\Main

    commands:
    kitpvp:
    description: "Transfers player to Kit-PvP"
    usage: "/kitpvp"
     
  2. RumDaDuMCPE

    RumDaDuMCPE Witch

    Messages:
    67
    GitHub:
    RumDaDuMCPE
    Solved.
    PHP:
    <?php

    namespace RumDaDuMCPE;

    use 
    pocketmine\command\{CommandSenderCommand};

    class 
    Main extends \pocketmine\plugin\PluginBase {

    public function 
    execute(CommandSender $senderCommand $command$label, array $args) {
    switch (
    $command->getName()) {
    case 
    "kitpvp":
    $sender->addTitle("§l§6RumBenCraft""§a>> §l§eConnecting to Kit-PvP §r§a<<"58020);$packet = new \pocketmine\network\mcpe\protocol\TransferPacket();
    $packet->address "here.there.whatt";
    $packet->port 10;
    $sender->dataPacket($packet);
    return 
    true;
    }
    }
    }
     
    Levi likes this.
  3. SOFe

    SOFe Administrator Staff Member PMMP Team Poggit Admin

    Messages:
    1,968
    GitHub:
    sof3
    Wtf
     
  4. RumDaDuMCPE

    RumDaDuMCPE Witch

    Messages:
    67
    GitHub:
    RumDaDuMCPE
    here.there.what
     
  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.