Advertisement
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

How to sent commands from console

Comments in 'Plugin Development' started by Asidert, Apr 11, 2015.

  1. Asidert
    Offline

    Asidert Active Member Plugin Developer

    Joined:
    Oct 21, 2014
    Posts:
    123
    Plugins:
    1
    Minecraft User:
    Asidert
    Hello, how sent command from console if player use any item (I know how make it), for example:
    Player eat stake and command from console /effect $player 1 10
    Else how set effect to player?
  2. CrazedMiner
    Offline

    CrazedMiner Notable Member Plugin Developer

    Joined:
    Jan 31, 2015
    Posts:
    348
    Plugins:
    2
    Minecraft User:
    CrazedMinerYT
    If you want to run the command from the console run it without a '/' like "effect (Player Name) 1 10"
  3. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,325
    Plugins:
    11
    Minecraft User:
    PEMapModder
    This us the plugin development forum... -_-#
    Avoid running commands. Try to use the API instead.
    https://github.com/PocketMine/PocketMine-MP/blob/master/src/pocketmine/entity/Entity.php#L298
    Last edited: Apr 11, 2015
    CrazedMiner likes this.
  4. Asidert
    Offline

    Asidert Active Member Plugin Developer

    Joined:
    Oct 21, 2014
    Posts:
    123
    Plugins:
    1
    Minecraft User:
    Asidert
  5. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,325
    Plugins:
    11
    Minecraft User:
    PEMapModder
    Asidert likes this.
  6. Asidert
    Offline

    Asidert Active Member Plugin Developer

    Joined:
    Oct 21, 2014
    Posts:
    123
    Plugins:
    1
    Minecraft User:
    Asidert
  7. Asidert
    Offline

    Asidert Active Member Plugin Developer

    Joined:
    Oct 21, 2014
    Posts:
    123
    Plugins:
    1
    Minecraft User:
    Asidert
  8. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,325
    Plugins:
    11
    Minecraft User:
    PEMapModder
    $player->addEffect(Effect::getEffect(Effect::SPEED)->setDuration($ticks)) maybe. That's what I think should be correct so far.

Share This Page

Advertisement