public static void load()
 {
     instance = new LoadedLaddersAndStairs();
 }
 public static void teleport(Player p, LoadedLaddersAndStairs.HeightObject obj)
 {
     p.getWalkingQueue().resetWalkingQueue();
     p.setTemporaryAttribute("unmovable", true);
     p.setFaceLocation(obj.getLocation());
     if (obj.getAnimation() != -1)
     {
         p.setLastAnimation(new Animation(obj.getAnimation()));
     }
     Event teleportEvent = new Event(obj.getAnimation() != -1 ? obj.getTeleDelay() : 500);
     teleportEvent.setAction(() =>
     {
         teleportEvent.stop();
         p.teleport(obj.getTeleLocation());
         p.removeTemporaryAttribute("unmovable");
     });
     Server.registerEvent(teleportEvent);
 }
Beispiel #3
0
 public static void load()
 {
     instance = new LoadedLaddersAndStairs();
 }