diff --git a/pom.xml b/pom.xml
index 39032a96b..76de12486 100644
--- a/pom.xml
+++ b/pom.xml
@@ -8,7 +8,7 @@
UTF-8
PlotSquared
- 3.2.20
+ 3.2.21
PlotSquared
jar
diff --git a/src/main/java/com/intellectualcrafters/plot/util/MainUtil.java b/src/main/java/com/intellectualcrafters/plot/util/MainUtil.java
index 678e973f9..5dc1ff85a 100644
--- a/src/main/java/com/intellectualcrafters/plot/util/MainUtil.java
+++ b/src/main/java/com/intellectualcrafters/plot/util/MainUtil.java
@@ -1765,45 +1765,48 @@ public class MainUtil {
if (!pw.ALLOW_SIGNS) {
return null;
}
- Location loc = plot.getManager().getSignLoc(pw, plot);
- ChunkManager.manager.loadChunk(loc.getWorld(), loc.getChunkLoc(), false);
- String[] lines = BlockManager.manager.getSign(loc);
- if (lines == null) {
- return null;
- }
- loop:
- for (int i = 4; i > 0; i--) {
- String caption = C.valueOf("OWNER_SIGN_LINE_" + i).s();
- int index = caption.indexOf("%plr%");
- if (index == -1) {
- continue;
- }
- String name = lines[i - 1].substring(index);
- if (name.length() == 0) {
+ try {
+ Location loc = plot.getManager().getSignLoc(pw, plot);
+ ChunkManager.manager.loadChunk(loc.getWorld(), loc.getChunkLoc(), false);
+ String[] lines = BlockManager.manager.getSign(loc);
+ if (lines == null) {
return null;
}
- UUID owner = UUIDHandler.getUUID(name, null);
- if (owner != null) {
- plot.owner = owner;
- break;
- }
- if (lines[i - 1].length() == 15) {
- BiMap map = UUIDHandler.getUuidMap();
- for (Entry entry : map.entrySet()) {
- String key = entry.getKey().value;
- if (key.length() > name.length() && key.startsWith(name)) {
- plot.owner = entry.getValue();
- break loop;
+ loop: for (int i = 4; i > 0; i--) {
+ String caption = C.valueOf("OWNER_SIGN_LINE_" + i).s();
+ int index = caption.indexOf("%plr%");
+ if (index == -1) {
+ continue;
+ }
+ String name = lines[i - 1].substring(index);
+ if (name.length() == 0) {
+ return null;
+ }
+ UUID owner = UUIDHandler.getUUID(name, null);
+ if (owner != null) {
+ plot.owner = owner;
+ break;
+ }
+ if (lines[i - 1].length() == 15) {
+ BiMap map = UUIDHandler.getUuidMap();
+ for (Entry entry : map.entrySet()) {
+ String key = entry.getKey().value;
+ if (key.length() > name.length() && key.startsWith(name)) {
+ plot.owner = entry.getValue();
+ break loop;
+ }
}
}
+ plot.owner = UUID.nameUUIDFromBytes(("OfflinePlayer:" + name).getBytes(StandardCharsets.UTF_8));
+ break;
}
- plot.owner = UUID.nameUUIDFromBytes(("OfflinePlayer:" + name).getBytes(StandardCharsets.UTF_8));
- break;
+ if (plot.owner != null) {
+ plot.create();
+ }
+ return plot.owner;
+ } catch (Exception e) {
+ return null;
}
- if (plot.owner != null) {
- plot.create();
- }
- return plot.owner;
}
public static boolean isUnowned(final String world, final PlotId pos1, final PlotId pos2) {
diff --git a/target/PlotSquared-Bukkit.jar b/target/PlotSquared-Bukkit.jar
index 602d991e1..7729f27c0 100644
Binary files a/target/PlotSquared-Bukkit.jar and b/target/PlotSquared-Bukkit.jar differ