mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2025-07-28 16:32:09 +00:00
Homes tolower.
Max homes fix.
This commit is contained in:
parent
27adc21446
commit
7df5098bf6
5 changed files with 10 additions and 8 deletions
|
@ -282,11 +282,12 @@ public class EssentialsUpgrade
|
||||||
final String defworld = (String)config.getProperty("home.default");
|
final String defworld = (String)config.getProperty("home.default");
|
||||||
final Location defloc = config.getLocation("home.worlds." + defworld, ess.getServer());
|
final Location defloc = config.getLocation("home.worlds." + defworld, ess.getServer());
|
||||||
|
|
||||||
String worldName = defloc.getWorld().getName().toLowerCase();
|
;
|
||||||
config.setProperty("homes.home", defloc);
|
config.setProperty("homes.home", defloc);
|
||||||
|
|
||||||
List<String> worlds = config.getKeys("home.worlds");
|
List<String> worlds = config.getKeys("home.worlds");
|
||||||
Location loc;
|
Location loc;
|
||||||
|
String worldName;
|
||||||
|
|
||||||
if (worlds == null)
|
if (worlds == null)
|
||||||
{
|
{
|
||||||
|
|
|
@ -36,7 +36,7 @@ public class Commanddelhome extends EssentialsCommand
|
||||||
user = getPlayer(server, args, 0);
|
user = getPlayer(server, args, 0);
|
||||||
name = args[1];
|
name = args[1];
|
||||||
}
|
}
|
||||||
user.delHome(name);
|
user.delHome(name.toLowerCase());
|
||||||
sender.sendMessage(Util.format("deleteHome", args[0]));
|
sender.sendMessage(Util.format("deleteHome", name));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -40,7 +40,7 @@ public class Commandhome extends EssentialsCommand
|
||||||
}
|
}
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
user.getTeleport().home(u, homeName, charge);
|
user.getTeleport().home(u, homeName.toLowerCase(), charge);
|
||||||
}
|
}
|
||||||
catch (NotEnoughArgumentsException e)
|
catch (NotEnoughArgumentsException e)
|
||||||
{
|
{
|
||||||
|
|
|
@ -21,10 +21,10 @@ public class Commandsethome extends EssentialsCommand
|
||||||
{
|
{
|
||||||
if (user.isAuthorized("essentials.sethome.multiple"))
|
if (user.isAuthorized("essentials.sethome.multiple"))
|
||||||
{
|
{
|
||||||
if ((user.isAuthorized("essentials.sethome.multiple.unlimited")) || (user.getHomes().size() <= ess.getSettings().getMultipleHomes())
|
if ((user.isAuthorized("essentials.sethome.multiple.unlimited")) || (user.getHomes().size() < ess.getSettings().getMultipleHomes())
|
||||||
|| (user.getHomes().contains(args[0])))
|
|| (user.getHomes().contains(args[0].toLowerCase())))
|
||||||
{
|
{
|
||||||
user.setHome(args[0]);
|
user.setHome(args[0].toLowerCase());
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -46,7 +46,7 @@ public class Commandsethome extends EssentialsCommand
|
||||||
{
|
{
|
||||||
throw new Exception(Util.i18n("playerNotFound"));
|
throw new Exception(Util.i18n("playerNotFound"));
|
||||||
}
|
}
|
||||||
usersHome.setHome(args[1], user.getLocation());
|
usersHome.setHome(args[1].toLowerCase(), user.getLocation());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,6 +21,7 @@ public class EssentialsSign
|
||||||
{
|
{
|
||||||
private static final Set<Material> EMPTY_SET = new HashSet<Material>();
|
private static final Set<Material> EMPTY_SET = new HashSet<Material>();
|
||||||
protected transient final String signName;
|
protected transient final String signName;
|
||||||
|
//TODO: Add these settings to messages
|
||||||
private static final String FORMAT_SUCCESS = "§1[%s]";
|
private static final String FORMAT_SUCCESS = "§1[%s]";
|
||||||
private static final String FORMAT_TEMPLATE = "[%s]";
|
private static final String FORMAT_TEMPLATE = "[%s]";
|
||||||
private static final String FORMAT_FAIL = "§4[%s]";
|
private static final String FORMAT_FAIL = "§4[%s]";
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue