File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed
Essentials/src/com/earth2me/essentials Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -667,6 +667,10 @@ public User getUser(final Player base)
667667
668668 if (user == null )
669669 {
670+ if (getSettings ().isDebug ())
671+ {
672+ LOGGER .log (Level .INFO , "Constructing new userfile from base player " + base .getName ());
673+ }
670674 user = new User (base , this );
671675 }
672676 else
Original file line number Diff line number Diff line change @@ -64,7 +64,8 @@ public User getUser(final String name)
6464 {
6565 try
6666 {
67- return users .get (name );
67+ String sanitizedName = StringUtil .sanitizeFileName (name );
68+ return users .get (sanitizedName );
6869 }
6970 catch (ExecutionException ex )
7071 {
@@ -104,7 +105,7 @@ public User load(final String name) throws Exception
104105 if (userFile .exists ())
105106 {
106107 keys .add (sanitizedName );
107- return new User (new OfflinePlayer (name , ess ), ess );
108+ return new User (new OfflinePlayer (sanitizedName , ess ), ess );
108109 }
109110 throw new Exception ("User not found!" );
110111 }
You can’t perform that action at this time.
0 commit comments