diff --git a/forge-1.11.2/src/main/java/org/dynmap/forge_1_11_2/DynmapPlugin.java b/forge-1.11.2/src/main/java/org/dynmap/forge_1_11_2/DynmapPlugin.java index b1ac90b4..68f5d235 100644 --- a/forge-1.11.2/src/main/java/org/dynmap/forge_1_11_2/DynmapPlugin.java +++ b/forge-1.11.2/src/main/java/org/dynmap/forge_1_11_2/DynmapPlugin.java @@ -1682,6 +1682,7 @@ public class DynmapPlugin World w = event.getWorld(); if(!(w instanceof WorldServer)) return; final ForgeWorld fw = getWorld(w); + if (fw == null) return; // This event can be called from off server thread, so push processing there core.getServer().scheduleServerTask(new Runnable() { public void run() { diff --git a/forge-1.12.2/src/main/java/org/dynmap/forge_1_12_2/DynmapPlugin.java b/forge-1.12.2/src/main/java/org/dynmap/forge_1_12_2/DynmapPlugin.java index b3cf00d5..b8fe147c 100644 --- a/forge-1.12.2/src/main/java/org/dynmap/forge_1_12_2/DynmapPlugin.java +++ b/forge-1.12.2/src/main/java/org/dynmap/forge_1_12_2/DynmapPlugin.java @@ -1689,6 +1689,7 @@ public class DynmapPlugin World w = event.getWorld(); if(!(w instanceof WorldServer)) return; final ForgeWorld fw = getWorld(w); + if (fw == null) return; // This event can be called from off server thread, so push processing there core.getServer().scheduleServerTask(new Runnable() { public void run() { diff --git a/forge-1.13.2/src/main/java/org/dynmap/forge_1_13_2/DynmapPlugin.java b/forge-1.13.2/src/main/java/org/dynmap/forge_1_13_2/DynmapPlugin.java index 528bb457..17fe8268 100644 --- a/forge-1.13.2/src/main/java/org/dynmap/forge_1_13_2/DynmapPlugin.java +++ b/forge-1.13.2/src/main/java/org/dynmap/forge_1_13_2/DynmapPlugin.java @@ -1656,6 +1656,7 @@ public class DynmapPlugin IWorld w = event.getWorld(); if(!(w instanceof WorldServer)) return; final ForgeWorld fw = getWorld(w); + if (fw == null) return; // This event can be called from off server thread, so push processing there core.getServer().scheduleServerTask(new Runnable() { public void run() { diff --git a/forge-1.14.4/src/main/java/org/dynmap/forge_1_14_4/DynmapPlugin.java b/forge-1.14.4/src/main/java/org/dynmap/forge_1_14_4/DynmapPlugin.java index 5b8ba11b..637ff8d1 100644 --- a/forge-1.14.4/src/main/java/org/dynmap/forge_1_14_4/DynmapPlugin.java +++ b/forge-1.14.4/src/main/java/org/dynmap/forge_1_14_4/DynmapPlugin.java @@ -1682,6 +1682,7 @@ public class DynmapPlugin IWorld w = event.getWorld(); if(!(w instanceof ServerWorld)) return; final ForgeWorld fw = getWorld(w); + if (fw == null) return; // This event can be called from off server thread, so push processing there core.getServer().scheduleServerTask(new Runnable() { public void run() { @@ -1794,6 +1795,7 @@ public class DynmapPlugin BlockUpdateRec r = new BlockUpdateRec(); r.w = event.getWorld(); ForgeWorld fw = getWorld(r.w, false); + if (fw == null) return; r.wid = fw.getName(); BlockPos p = event.getPos(); r.x = p.getX(); diff --git a/forge-1.15.2/src/main/java/org/dynmap/forge_1_15_2/DynmapPlugin.java b/forge-1.15.2/src/main/java/org/dynmap/forge_1_15_2/DynmapPlugin.java index 31e76761..902fb52f 100644 --- a/forge-1.15.2/src/main/java/org/dynmap/forge_1_15_2/DynmapPlugin.java +++ b/forge-1.15.2/src/main/java/org/dynmap/forge_1_15_2/DynmapPlugin.java @@ -1682,6 +1682,7 @@ public class DynmapPlugin IWorld w = event.getWorld(); if(!(w instanceof ServerWorld)) return; final ForgeWorld fw = getWorld(w); + if (fw == null) return; // This event can be called from off server thread, so push processing there core.getServer().scheduleServerTask(new Runnable() { public void run() { @@ -1794,6 +1795,7 @@ public class DynmapPlugin BlockUpdateRec r = new BlockUpdateRec(); r.w = event.getWorld(); ForgeWorld fw = getWorld(r.w, false); + if (fw == null) return; r.wid = fw.getName(); BlockPos p = event.getPos(); r.x = p.getX(); diff --git a/forge-1.16.1/src/main/java/org/dynmap/forge_1_16_1/DynmapPlugin.java b/forge-1.16.1/src/main/java/org/dynmap/forge_1_16_1/DynmapPlugin.java index 422107b9..da384e29 100644 --- a/forge-1.16.1/src/main/java/org/dynmap/forge_1_16_1/DynmapPlugin.java +++ b/forge-1.16.1/src/main/java/org/dynmap/forge_1_16_1/DynmapPlugin.java @@ -1791,6 +1791,7 @@ public class DynmapPlugin BlockUpdateRec r = new BlockUpdateRec(); r.w = event.getWorld(); ForgeWorld fw = getWorld(r.w, false); + if (fw == null) return; r.wid = fw.getName(); BlockPos p = event.getPos(); r.x = p.getX();