From 15bc964fcc9b7ab0e878d3147c012cef35c84bfb Mon Sep 17 00:00:00 2001 From: Brian Fopiano Date: Fri, 18 Mar 2022 16:05:38 -0700 Subject: [PATCH] Ascync tp is disabled for now Ascync TP is done in 1.18 already, and this is just a dirty fix to stop crashing/ lol --- .../framework/EngineAssignedWorldManager.java | 43 +++++++++++-------- 1 file changed, 25 insertions(+), 18 deletions(-) diff --git a/src/main/java/com/volmit/iris/engine/framework/EngineAssignedWorldManager.java b/src/main/java/com/volmit/iris/engine/framework/EngineAssignedWorldManager.java index b5d457730..4b591fef9 100644 --- a/src/main/java/com/volmit/iris/engine/framework/EngineAssignedWorldManager.java +++ b/src/main/java/com/volmit/iris/engine/framework/EngineAssignedWorldManager.java @@ -69,24 +69,31 @@ public abstract class EngineAssignedWorldManager extends EngineAssignedComponent protected AtomicBoolean ignoreTP = new AtomicBoolean(false); - @EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true) - public void on(PlayerTeleportEvent e) { - if(ignoreTP.get()) { - return; - } - - if(!PaperLib.isPaper() || e.getTo() == null) { - return; - } - - try { - if(e.getTo().getWorld().equals(getTarget().getWorld().realWorld())) { - getEngine().getWorldManager().teleportAsync(e); - } - } catch(Throwable ex) { - - } - } +// @EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true) +// public void on(PlayerTeleportEvent e) { +// if(ignoreTP.get()) { +// System.out.println("IgTP1"); +// return; +// } +// +// if(!PaperLib.isPaper() || e.getTo() == null) { +// System.out.println("IgTP2"); +// +//// return; +// } +// +//// try { +//// System.out.println("IgTP3"); +//// +//// if(e.getTo().getWorld().equals(getTarget().getWorld().realWorld())) { +//// System.out.println("IgTP4"); +//// +//// getEngine().getWorldManager().teleportAsync(e); +//// } +//// } catch(Throwable ex) { +//// +//// } +// } @EventHandler public void on(WorldSaveEvent e) {