From 47915b8b86ff0a0330e2645c765b2069349a58c7 Mon Sep 17 00:00:00 2001 From: Jesse Boyd Date: Thu, 20 Apr 2017 01:09:52 +1000 Subject: [PATCH] Read sign on main thread --- .../java/com/intellectualcrafters/plot/object/Plot.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Core/src/main/java/com/intellectualcrafters/plot/object/Plot.java b/Core/src/main/java/com/intellectualcrafters/plot/object/Plot.java index 3b8cd29b7..6cb9ea1f9 100644 --- a/Core/src/main/java/com/intellectualcrafters/plot/object/Plot.java +++ b/Core/src/main/java/com/intellectualcrafters/plot/object/Plot.java @@ -2031,9 +2031,14 @@ public class Plot { return null; } try { - Location loc = this.getManager().getSignLoc(this.area, this); + final Location loc = this.getManager().getSignLoc(this.area, this); ChunkManager.manager.loadChunk(loc.getWorld(), loc.getChunkLoc(), false); - String[] lines = WorldUtil.IMP.getSign(loc); + String[] lines = TaskManager.IMP.sync(new RunnableVal() { + @Override + public void run(String[] value) { + this.value = WorldUtil.IMP.getSign(loc); + } + }); if (lines == null) { return null; }