forked from LogBlock/LogBlock
Limit UUIDs to 36 chars + prevent null UUIDs
This commit is contained in:
@ -37,13 +37,13 @@ public class Actor {
|
|||||||
|
|
||||||
public Actor(String name, String UUID) {
|
public Actor(String name, String UUID) {
|
||||||
this.name = name;
|
this.name = name;
|
||||||
this.UUID = UUID;
|
this.UUID = UUID == null ? "unknown" : (UUID.length() > 36 ? UUID.substring(0, 36) : UUID);
|
||||||
this.blockLocation = null;
|
this.blockLocation = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Actor(String name, String UUID, Block block) {
|
public Actor(String name, String UUID, Block block) {
|
||||||
this.name = name;
|
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();
|
this.blockLocation = block == null ? null : block.getLocation();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user