Add spawn/setspawn commands
This commit is contained in:
parent
0cb0352062
commit
1c63a59566
8 changed files with 101 additions and 24 deletions
|
@ -28,27 +28,21 @@ public class TeleportRunnable implements Runnable {
|
|||
}
|
||||
}
|
||||
|
||||
Action.PlayerInst.teleportTo(Action.Dimension, Action.Position.x, Action.Position.y, Action.Position.z, Action.Rotation.y, Action.Rotation.x);
|
||||
if(Action.world_pos.Dimension.equalsIgnoreCase((new WorldPosition(Action.PlayerInst).Dimension))) {
|
||||
Action.PlayerInst.setPos(Action.Position);
|
||||
}else {
|
||||
Action.PlayerInst.changeDimension(Action.Dimension);
|
||||
|
||||
try {
|
||||
Thread.sleep(1000);
|
||||
} catch (InterruptedException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
|
||||
Action.PlayerInst.setPos(Action.Position);
|
||||
}
|
||||
|
||||
Action.PlayerInst.onUpdateAbilities();
|
||||
|
||||
|
||||
Thread tx = new Thread(new Runnable(){
|
||||
public final TeleportContainer container=Action;
|
||||
@Override
|
||||
public void run()
|
||||
{
|
||||
try {
|
||||
Thread.sleep(1000);
|
||||
} catch (InterruptedException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
container.PlayerInst.onUpdateAbilities();
|
||||
container.PlayerInst.setPos(container.Position);
|
||||
container.PlayerInst.giveExperiencePoints(1);
|
||||
}
|
||||
});
|
||||
|
||||
tx.start();
|
||||
Action.PlayerInst.giveExperiencePoints(1);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue