Spawn Set

Discussion in 'Plugin Development' started by aguy867867, Jun 20, 2014.

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

    aguy867867

    Anyone know a way to set a player's spawn without using sudo? I don't want the player to have permissions to do /spawnpoint. I tried the following code already but it isnt very efficient.
    Code:
      Bukkit.dispatchCommand(Bukkit.getConsoleSender(), "sudo "+ p.getName() + " spawnpoint"); 
     
  2. Offline

    HeadGam3z

    I'm confused on what you're asking.

    When do you the spawnpoint to be set? On command, or on player join?
     
  3. Offline

    aguy867867

    On player join

    But the spawn has to be changeable

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 9, 2016
  4. Offline

    TheBlack100

    p.getLocation().getWorld().setSpawnLocation((int)p.getLocation().getX(), (int)p.getLocation().getY(), (int)p.getLocation().getZ());
     
  5. Offline

    xTigerRebornx

  6. Offline

    aguy867867

    Thanks theblack100 it worked
     
Thread Status:
Not open for further replies.

Share This Page