mirror of
https://github.com/EssentialsX/Essentials.git
synced 2025-02-05 12:10:12 +08:00
Stop users from using /sethome bed
This commit is contained in:
parent
d1d31e9769
commit
292b7b0546
@ -29,6 +29,9 @@ public class Commandsethome extends EssentialsCommand
|
|||||||
{
|
{
|
||||||
if (user.isAuthorized("essentials.sethome.multiple"))
|
if (user.isAuthorized("essentials.sethome.multiple"))
|
||||||
{
|
{
|
||||||
|
if ("bed".equals(args[0].toLowerCase(Locale.ENGLISH))) {
|
||||||
|
throw new NotEnoughArgumentsException();
|
||||||
|
}
|
||||||
if ((user.isAuthorized("essentials.sethome.multiple.unlimited")) || (user.getHomes().size() < ess.getSettings().getHomeLimit(user))
|
if ((user.isAuthorized("essentials.sethome.multiple.unlimited")) || (user.getHomes().size() < ess.getSettings().getHomeLimit(user))
|
||||||
|| (user.getHomes().contains(args[0].toLowerCase(Locale.ENGLISH))))
|
|| (user.getHomes().contains(args[0].toLowerCase(Locale.ENGLISH))))
|
||||||
{
|
{
|
||||||
@ -63,6 +66,9 @@ public class Commandsethome extends EssentialsCommand
|
|||||||
{
|
{
|
||||||
name = "home";
|
name = "home";
|
||||||
}
|
}
|
||||||
|
if ("bed".equals(name.toLowerCase(Locale.ENGLISH))) {
|
||||||
|
throw new NotEnoughArgumentsException();
|
||||||
|
}
|
||||||
usersHome.setHome(name, user.getLocation());
|
usersHome.setHome(name, user.getLocation());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user