Send a player into a bed

Discussion in 'Plugin Development' started by xZise, Mar 28, 2011.

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

    xZise

    Hello,
    how could I send a player into a bed, so it would skip the night?

    Fabian
     
  2. Offline

    xZise

    So there is no way to send a player remotely into a given bed?

    Fabian
     
  3. Offline

    Crash

    Try this :
    Code:
    CraftPlayer p = (CraftPlayer)player;
    p.getHandle().a(bedx, bedy, bedz);
    
     
  4. Offline

    Edward Hand

    Looking at the code, I think that will only work if the player is within a 4 block radius of the bed, so you may need to teleport them there first.
     
  5. Offline

    Crash

    Yeah I also found when I tested it, the player doesn't actually go in the bed with the leave bed button and stuff.
     
  6. Offline

    xZise

    Okay, but would be nice if it could be done via bukkit and with the ui changes.

    Fabian
     
  7. Offline

    Crash

    I don't think that's possible right now :\
    What's wrong with craftbukkit
     
  8. Offline

    xZise

    Nothing, but with this change it depend on CraftBukkit and not on Bukkit anymore. Instead it would be nice, if the Player interface has a “sendToBed(Bed)” method. And some time this could be fully functional.

    Fabian
     
Thread Status:
Not open for further replies.

Share This Page