Read sign on main thread

This commit is contained in:
Jesse Boyd 2017-04-20 01:09:52 +10:00
parent 3c110bb125
commit 47915b8b86
No known key found for this signature in database
GPG Key ID: 59F1DE6293AF6E1F

View File

@ -2031,9 +2031,14 @@ public class Plot {
return null; return null;
} }
try { 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); ChunkManager.manager.loadChunk(loc.getWorld(), loc.getChunkLoc(), false);
String[] lines = WorldUtil.IMP.getSign(loc); String[] lines = TaskManager.IMP.sync(new RunnableVal<String[]>() {
@Override
public void run(String[] value) {
this.value = WorldUtil.IMP.getSign(loc);
}
});
if (lines == null) { if (lines == null) {
return null; return null;
} }