Limit UUIDs to 36 chars + prevent null UUIDs
This commit is contained in:
1 parent
0bdeb7dc86
commit
faaab7c4f6
1 file changed
+2
-2
@@ -37,13 +37,13 @@ public class Actor {
|
||||
|
||||
public Actor(String name, String UUID) {
|
||||
this.name = name;
|
||||
this.UUID = UUID;
|
||||
this.UUID = UUID == null ? "unknown" : (UUID.length() > 36 ? UUID.substring(0, 36) : UUID);
|
||||
this.blockLocation = null;
|
||||
}
|
||||
|
||||
public Actor(String name, String UUID, Block block) {
|
||||
this.name = name;
|
||||
this.UUID = UUID;
|
||||
this.UUID = UUID == null ? "unknown" : (UUID.length() > 36 ? UUID.substring(0, 36) : UUID);
|
||||
this.blockLocation = block == null ? null : block.getLocation();
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user