mirror of
https://github.com/EssentialsX/Essentials.git
synced 2025-03-02 11:11:58 +01:00
Constant user file casing.
This commit is contained in:
parent
3b35763fef
commit
470f4c1b3e
@ -667,6 +667,10 @@ public class Essentials extends JavaPlugin implements net.ess3.api.IEssentials
|
|||||||
|
|
||||||
if (user == null)
|
if (user == null)
|
||||||
{
|
{
|
||||||
|
if (getSettings().isDebug())
|
||||||
|
{
|
||||||
|
LOGGER.log(Level.INFO, "Constructing new userfile from base player " + base.getName());
|
||||||
|
}
|
||||||
user = new User(base, this);
|
user = new User(base, this);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -64,7 +64,8 @@ public class UserMap extends CacheLoader<String, User> implements IConf
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
return users.get(name);
|
String sanitizedName = StringUtil.sanitizeFileName(name);
|
||||||
|
return users.get(sanitizedName);
|
||||||
}
|
}
|
||||||
catch (ExecutionException ex)
|
catch (ExecutionException ex)
|
||||||
{
|
{
|
||||||
@ -104,7 +105,7 @@ public class UserMap extends CacheLoader<String, User> implements IConf
|
|||||||
if (userFile.exists())
|
if (userFile.exists())
|
||||||
{
|
{
|
||||||
keys.add(sanitizedName);
|
keys.add(sanitizedName);
|
||||||
return new User(new OfflinePlayer(name, ess), ess);
|
return new User(new OfflinePlayer(sanitizedName, ess), ess);
|
||||||
}
|
}
|
||||||
throw new Exception("User not found!");
|
throw new Exception("User not found!");
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user