mirror of
https://github.com/EssentialsX/Essentials.git
synced 2024-12-27 19:47:42 +01:00
Fix for home names containing invalid characters.
This commit is contained in:
parent
e9c0bb2133
commit
d9ceb727ef
@ -154,6 +154,8 @@ public abstract class UserData extends PlayerExtension implements IConf
|
|||||||
|
|
||||||
public void setHome(String name, Location loc)
|
public void setHome(String name, Location loc)
|
||||||
{
|
{
|
||||||
|
//Invalid names will corrupt the yaml
|
||||||
|
name = Util.sanitizeFileName(name);
|
||||||
homes.put(name, loc);
|
homes.put(name, loc);
|
||||||
config.setProperty("homes." + name, loc);
|
config.setProperty("homes." + name, loc);
|
||||||
config.save();
|
config.save();
|
||||||
|
Loading…
Reference in New Issue
Block a user