Handle events from updates on disabled worlds properly
This commit is contained in:
parent
06f149f731
commit
a70d091d9a
6 changed files with 8 additions and 0 deletions
|
|
@ -1682,6 +1682,7 @@ public class DynmapPlugin
|
||||||
World w = event.getWorld();
|
World w = event.getWorld();
|
||||||
if(!(w instanceof WorldServer)) return;
|
if(!(w instanceof WorldServer)) return;
|
||||||
final ForgeWorld fw = getWorld(w);
|
final ForgeWorld fw = getWorld(w);
|
||||||
|
if (fw == null) return;
|
||||||
// This event can be called from off server thread, so push processing there
|
// This event can be called from off server thread, so push processing there
|
||||||
core.getServer().scheduleServerTask(new Runnable() {
|
core.getServer().scheduleServerTask(new Runnable() {
|
||||||
public void run() {
|
public void run() {
|
||||||
|
|
|
||||||
|
|
@ -1689,6 +1689,7 @@ public class DynmapPlugin
|
||||||
World w = event.getWorld();
|
World w = event.getWorld();
|
||||||
if(!(w instanceof WorldServer)) return;
|
if(!(w instanceof WorldServer)) return;
|
||||||
final ForgeWorld fw = getWorld(w);
|
final ForgeWorld fw = getWorld(w);
|
||||||
|
if (fw == null) return;
|
||||||
// This event can be called from off server thread, so push processing there
|
// This event can be called from off server thread, so push processing there
|
||||||
core.getServer().scheduleServerTask(new Runnable() {
|
core.getServer().scheduleServerTask(new Runnable() {
|
||||||
public void run() {
|
public void run() {
|
||||||
|
|
|
||||||
|
|
@ -1656,6 +1656,7 @@ public class DynmapPlugin
|
||||||
IWorld w = event.getWorld();
|
IWorld w = event.getWorld();
|
||||||
if(!(w instanceof WorldServer)) return;
|
if(!(w instanceof WorldServer)) return;
|
||||||
final ForgeWorld fw = getWorld(w);
|
final ForgeWorld fw = getWorld(w);
|
||||||
|
if (fw == null) return;
|
||||||
// This event can be called from off server thread, so push processing there
|
// This event can be called from off server thread, so push processing there
|
||||||
core.getServer().scheduleServerTask(new Runnable() {
|
core.getServer().scheduleServerTask(new Runnable() {
|
||||||
public void run() {
|
public void run() {
|
||||||
|
|
|
||||||
|
|
@ -1682,6 +1682,7 @@ public class DynmapPlugin
|
||||||
IWorld w = event.getWorld();
|
IWorld w = event.getWorld();
|
||||||
if(!(w instanceof ServerWorld)) return;
|
if(!(w instanceof ServerWorld)) return;
|
||||||
final ForgeWorld fw = getWorld(w);
|
final ForgeWorld fw = getWorld(w);
|
||||||
|
if (fw == null) return;
|
||||||
// This event can be called from off server thread, so push processing there
|
// This event can be called from off server thread, so push processing there
|
||||||
core.getServer().scheduleServerTask(new Runnable() {
|
core.getServer().scheduleServerTask(new Runnable() {
|
||||||
public void run() {
|
public void run() {
|
||||||
|
|
@ -1794,6 +1795,7 @@ public class DynmapPlugin
|
||||||
BlockUpdateRec r = new BlockUpdateRec();
|
BlockUpdateRec r = new BlockUpdateRec();
|
||||||
r.w = event.getWorld();
|
r.w = event.getWorld();
|
||||||
ForgeWorld fw = getWorld(r.w, false);
|
ForgeWorld fw = getWorld(r.w, false);
|
||||||
|
if (fw == null) return;
|
||||||
r.wid = fw.getName();
|
r.wid = fw.getName();
|
||||||
BlockPos p = event.getPos();
|
BlockPos p = event.getPos();
|
||||||
r.x = p.getX();
|
r.x = p.getX();
|
||||||
|
|
|
||||||
|
|
@ -1682,6 +1682,7 @@ public class DynmapPlugin
|
||||||
IWorld w = event.getWorld();
|
IWorld w = event.getWorld();
|
||||||
if(!(w instanceof ServerWorld)) return;
|
if(!(w instanceof ServerWorld)) return;
|
||||||
final ForgeWorld fw = getWorld(w);
|
final ForgeWorld fw = getWorld(w);
|
||||||
|
if (fw == null) return;
|
||||||
// This event can be called from off server thread, so push processing there
|
// This event can be called from off server thread, so push processing there
|
||||||
core.getServer().scheduleServerTask(new Runnable() {
|
core.getServer().scheduleServerTask(new Runnable() {
|
||||||
public void run() {
|
public void run() {
|
||||||
|
|
@ -1794,6 +1795,7 @@ public class DynmapPlugin
|
||||||
BlockUpdateRec r = new BlockUpdateRec();
|
BlockUpdateRec r = new BlockUpdateRec();
|
||||||
r.w = event.getWorld();
|
r.w = event.getWorld();
|
||||||
ForgeWorld fw = getWorld(r.w, false);
|
ForgeWorld fw = getWorld(r.w, false);
|
||||||
|
if (fw == null) return;
|
||||||
r.wid = fw.getName();
|
r.wid = fw.getName();
|
||||||
BlockPos p = event.getPos();
|
BlockPos p = event.getPos();
|
||||||
r.x = p.getX();
|
r.x = p.getX();
|
||||||
|
|
|
||||||
|
|
@ -1791,6 +1791,7 @@ public class DynmapPlugin
|
||||||
BlockUpdateRec r = new BlockUpdateRec();
|
BlockUpdateRec r = new BlockUpdateRec();
|
||||||
r.w = event.getWorld();
|
r.w = event.getWorld();
|
||||||
ForgeWorld fw = getWorld(r.w, false);
|
ForgeWorld fw = getWorld(r.w, false);
|
||||||
|
if (fw == null) return;
|
||||||
r.wid = fw.getName();
|
r.wid = fw.getName();
|
||||||
BlockPos p = event.getPos();
|
BlockPos p = event.getPos();
|
||||||
r.x = p.getX();
|
r.x = p.getX();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue