Add ClientWorld hack

This commit is contained in:
Mike Primm 2022-07-24 17:24:19 -05:00
parent 8e27d5defd
commit e0619ec650

View File

@ -1823,6 +1823,7 @@ public class DynmapPlugin
if(!onblockchange) return; if(!onblockchange) return;
BlockUpdateRec r = new BlockUpdateRec(); BlockUpdateRec r = new BlockUpdateRec();
r.w = event.getWorld(); r.w = event.getWorld();
if(!(r.w instanceof ServerWorld)) return; // band-aid to prevent errors in unsupported 'running in client' scenario
ForgeWorld fw = getWorld((IServerWorld)r.w, false); ForgeWorld fw = getWorld((IServerWorld)r.w, false);
if (fw == null) return; if (fw == null) return;
r.wid = fw.getName(); r.wid = fw.getName();