diff --git a/src/main/java/me/cortex/voxy/common/world/WorldEngine.java b/src/main/java/me/cortex/voxy/common/world/WorldEngine.java index 4d7e37cb..d83e0ba7 100644 --- a/src/main/java/me/cortex/voxy/common/world/WorldEngine.java +++ b/src/main/java/me/cortex/voxy/common/world/WorldEngine.java @@ -163,15 +163,18 @@ public class WorldEngine { } public void markActive() { + if (!this.isLive) throw new IllegalStateException(); this.lastActiveTime = System.currentTimeMillis(); } public void acquireRef() { + if (!this.isLive) throw new IllegalStateException(); this.refCount.incrementAndGet(); this.lastActiveTime = System.currentTimeMillis(); } public void releaseRef() { + if (!this.isLive) throw new IllegalStateException(); if (this.refCount.decrementAndGet()<0) { throw new IllegalStateException("ref count less than 0"); }