mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-29 08:36:45 +01:00
Check player name for invalid character first
This commit is contained in:
parent
88f5e5b0bc
commit
e7990a06e2
@ -279,4 +279,13 @@ public class StringMan {
|
|||||||
}
|
}
|
||||||
return col;
|
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;
|
return uuid;
|
||||||
}
|
}
|
||||||
// Read from disk OR convert directly to offline 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);
|
uuid = this.uuidWrapper.getUUID(name);
|
||||||
add(new StringWrapper(name), uuid);
|
add(new StringWrapper(name), uuid);
|
||||||
return uuid;
|
return uuid;
|
||||||
|
Loading…
Reference in New Issue
Block a user