From ba2f9159b68646dd437cc62d98d76095b9868074 Mon Sep 17 00:00:00 2001 From: Jesse Boyd Date: Fri, 20 May 2016 23:49:09 +1000 Subject: [PATCH] Get entities sync --- .../com/boydti/fawe/wrappers/WorldWrapper.java | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/core/src/main/java/com/boydti/fawe/wrappers/WorldWrapper.java b/core/src/main/java/com/boydti/fawe/wrappers/WorldWrapper.java index e2963eaa..ad7c3d5c 100644 --- a/core/src/main/java/com/boydti/fawe/wrappers/WorldWrapper.java +++ b/core/src/main/java/com/boydti/fawe/wrappers/WorldWrapper.java @@ -363,13 +363,23 @@ public class WorldWrapper extends AbstractWorld { } @Override - public List getEntities(Region region) { - return parent.getEntities(region); + public List getEntities(final Region region) { + return TaskManager.IMP.sync(new RunnableVal>() { + @Override + public void run(List value) { + this.value = parent.getEntities(region); + } + }); } @Override public List getEntities() { - return parent.getEntities(); + return TaskManager.IMP.sync(new RunnableVal>() { + @Override + public void run(List value) { + this.value = parent.getEntities(); + } + }); } @Override