From f01b242e4adac1666b7284755a5df53532dc7f22 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexander=20S=C3=B6derberg?= Date: Wed, 20 May 2020 15:26:20 +0200 Subject: [PATCH] For sign updating to be scheduled asynchronously. It then forces it back on the main thread, so it's fine, but this way we can safely wait for the UUID mapping to be fetched. --- Core/src/main/java/com/plotsquared/core/plot/Plot.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Core/src/main/java/com/plotsquared/core/plot/Plot.java b/Core/src/main/java/com/plotsquared/core/plot/Plot.java index 9ac482be6..df9ee12c4 100644 --- a/Core/src/main/java/com/plotsquared/core/plot/Plot.java +++ b/Core/src/main/java/com/plotsquared/core/plot/Plot.java @@ -1046,9 +1046,11 @@ public class Plot { } if (createSign) { GlobalBlockQueue.IMP.addEmptyTask(() -> { - for (Plot current : plots) { - current.setSign(MainUtil.getName(current.getOwnerAbs())); - } + TaskManager.runTaskAsync(() -> { + for (Plot current : plots) { + current.setSign(MainUtil.getName(current.getOwnerAbs())); + } + }); }); } if (createRoad) {