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

MultiWorld TP Plugin Help!

Comments in 'Plugin Development' started by DC4CODE, Apr 17, 2016.

  1. DC4CODE
    Offline

    DC4CODE Active Member

    Joined:
    Nov 19, 2015
    Posts:
    64
    Minecraft User:
    dxdsc9349
    I've been programming for hours and looking at other plugins...
    How do I do this:


    /tpworld <WorldName>

    and have the sender of that command to be teleported to <WorldName>

    Basically the problem is i dont know how to store user input from the command


    for example


    /text Hello



    prints out 'Hello'

    and stuff...
  2. basprohop
    Offline

    basprohop Active Member Plugin Developer

    Joined:
    Aug 8, 2015
    Posts:
    128
    Plugins:
    3
    Minecraft User:
    basprohop
  3. DC4CODE
    Offline

    DC4CODE Active Member

    Joined:
    Nov 19, 2015
    Posts:
    64
    Minecraft User:
    dxdsc9349
  4. DC4CODE
    Offline

    DC4CODE Active Member

    Joined:
    Nov 19, 2015
    Posts:
    64
    Minecraft User:
    dxdsc9349
    Can you just give me an example command like this:



    /world <world>


    stores <world> into varable
  5. minebuilder0110
    Offline

    minebuilder0110 Notable Member

    Joined:
    Dec 8, 2014
    Posts:
    485
    Minecraft User:
    Apparitional
    Upon executing:
    Code:
    /command potato spinach
    , in:
    public function onCommand(CommandSender $sender, Command $command, $label, array $args)
    , $command->getName() becomes
    Code:
    command
    and the array $args become:
    Code:
    [0] => potato
    [1] => spinach
    
    .
    Vaivez66 likes this.

Share This Page

Advertisement