mirror of
https://github.com/TotalFreedomMC/TF-PlotSquared.git
synced 2024-12-23 00:15:06 +00:00
Check player name for invalid character first
This commit is contained in:
parent
88f5e5b0bc
commit
e7990a06e2
2 changed files with 10 additions and 1 deletions
|
@ -279,4 +279,13 @@ public class StringMan {
|
|||
}
|
||||
return col;
|
||||
}
|
||||
|
||||
public static boolean contains(String name, char c) {
|
||||
for (char current : name.toCharArray()) {
|
||||
if (c == current) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -232,7 +232,7 @@ public abstract class UUIDHandlerImplementation {
|
|||
return uuid;
|
||||
}
|
||||
// Read from disk OR convert directly to offline UUID
|
||||
if (Settings.UUID.OFFLINE) {
|
||||
if (Settings.UUID.OFFLINE && !StringMan.contains(name, ';')) {
|
||||
uuid = this.uuidWrapper.getUUID(name);
|
||||
add(new StringWrapper(name), uuid);
|
||||
return uuid;
|
||||
|
|
Loading…
Reference in a new issue