Bukkit Help

Discussion in 'Plugin Development' started by TH3B3ASTDR4GON, Sep 7, 2014.

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

    TH3B3ASTDR4GON

    So I am making a global shout plugin and I was wondering how I can get the players world. player.getWorld() returns a value like CraftWorld{name=Spawn} but I am trying to get just Spawn. Any suggestions? The world will be directly displayed in a message without any modifications (unless needed). Thanks!
     
  2. Offline

    Iroh

    Moved to plugin development.
     
  3. Offline

    firecombat4

    I'm not entirely sure what your asking, but the getWorld() method is returning the World object, if you want to get the world name you would do
    Code:
    player.getWorld().getName()
    or if your trying to get the worlds spawn location you could do
    Code:
    player.getWorld().getSpawnLocation()
    Which returns the Location object where you can get the spawn x, y and z.
     
    TH3B3ASTDR4GON likes this.
  4. Offline

    TH3B3ASTDR4GON

    Thanks! You solved it! Im a begginer at the bukkit API so I really appreciate the help!
     
Thread Status:
Not open for further replies.

Share This Page