mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2025-07-24 14:33:51 +00:00
Allow different 'sets' of multiple homes, definable by permission.
- Not sure I like this, but it does seem to work - changed config key for backwards compatibility (config node sets value on failure).
This commit is contained in:
parent
629dee3a91
commit
ea76161ba5
4 changed files with 115 additions and 45 deletions
|
@ -28,14 +28,14 @@ public class Commandsethome extends EssentialsCommand
|
|||
{
|
||||
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().getHomeLimit(user))
|
||||
|| (user.getHomes().contains(args[0].toLowerCase())))
|
||||
{
|
||||
user.setHome(args[0].toLowerCase());
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new Exception(Util.format("maxHomes", ess.getSettings().getMultipleHomes()));
|
||||
throw new Exception(Util.format("maxHomes", ess.getSettings().getHomeLimit(user)));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue