Help with dev of a spawn plugin

Discussion in 'Plugin Development' started by RevertiveDeath, May 12, 2012.

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

    RevertiveDeath

    For some reason when i use /spawn nothing happens on client and server side. Here is my class:
    http://pastie.org/3903402
     
  2. Offline

    exextatic

    Add some debugging code to see where it's getting up to, it may have gotten stuck on the if statement (has happened to me before).
     
  3. Offline

    Theodossis

    Try this:
    Code:
                Location spawn = player.getWorld().getSpawnLocation();
                spawn.setX(spawn.getBlockX());
                spawn.setY(spawn.getBlockY());
                spawn.setZ(spawn.getBlockZ());
                player.teleport(spawn);
                            //do something
     
  4. Offline

    JayzaSapphire

    You registered the command twice maybe?, if you haven't fixed this yet, try /spawn spawn
    And see if that works. If so remove one of the bits adding the command.
     
  5. Offline

    Wundark

    Did you register the /spawn command? If nothing happens that is because its not registered.
     
  6. Offline

    RevertiveDeath

    Ok i fixed it using Theodossis and Wundark! Ty everyone. Here is my spawn statement:
    Code:
    Location spawn = player.getWorld().getSpawnLocation();
    player.teleport(spawn);
    It was an easy fix actually I just had to declare a server. I used Theodossis on my /setspawn:
    Code:
    player.getWorld().setSpawnLocation(player.getLocation().getBlockX(), player.getLocation().getBlockY(), player.getLocation().getBlockZ());
    But it all works fine! Here is my plugin:
    http://dev.bukkit.org/server-mods/server-starter/
     
Thread Status:
Not open for further replies.

Share This Page