diff options
author | KHobbits <rob@khobbits.co.uk> | 2012-01-28 01:09:02 +0000 |
---|---|---|
committer | KHobbits <rob@khobbits.co.uk> | 2012-01-28 01:09:02 +0000 |
commit | e6d525a1687d254086c8a2dfcfa518355f6192bd (patch) | |
tree | 3a41ca7ce6c8fb7e79deea1a36a026d0312c584e | |
parent | e82ee71bd93ee076485788a67ff9b9577ddc3cdf (diff) | |
download | Essentials-e6d525a1687d254086c8a2dfcfa518355f6192bd.tar Essentials-e6d525a1687d254086c8a2dfcfa518355f6192bd.tar.gz Essentials-e6d525a1687d254086c8a2dfcfa518355f6192bd.tar.lz Essentials-e6d525a1687d254086c8a2dfcfa518355f6192bd.tar.xz Essentials-e6d525a1687d254086c8a2dfcfa518355f6192bd.zip |
Stop users from using /sethome bed
-rw-r--r-- | Essentials/src/com/earth2me/essentials/commands/Commandsethome.java | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandsethome.java b/Essentials/src/com/earth2me/essentials/commands/Commandsethome.java index e7687fcfd..ec19ca678 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandsethome.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandsethome.java @@ -29,6 +29,9 @@ public class Commandsethome extends EssentialsCommand { 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)) || (user.getHomes().contains(args[0].toLowerCase(Locale.ENGLISH)))) { @@ -63,6 +66,9 @@ public class Commandsethome extends EssentialsCommand { name = "home"; } + if ("bed".equals(name.toLowerCase(Locale.ENGLISH))) { + throw new NotEnoughArgumentsException(); + } usersHome.setHome(name, user.getLocation()); } } |