How to Teleport ?

Discussion in 'Plugin Development' started by MindCode, Jan 23, 2011.

Thread Status:
Not open for further replies.
  1. Offline

    MindCode

    Hello,

    I like to write a jail plugin.
    with the command /jail <user>

    So i have:

    String[] jailer = cmd.split(" ");

    it means jailer[1] is the name of the <user>

    my question is now how to teleport this user
    to any locaion with the teleportclass ?!
     
  2. Offline

    Lycake

    Code:
    Player player = plugin.getServer().getPlayer(jailer[1]);
    player.teleportTo(location);

    Cake
     
  3. Offline

    MindCode

    thanks...

    later i will add /setjail with player.getlocation and save it in the config file
    so i need to know how "location" is defined ? :)
     
  4. Offline

    Lycake

Thread Status:
Not open for further replies.

Share This Page