summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKHobbits <rob@khobbits.co.uk>2012-01-28 01:09:02 +0000
committerKHobbits <rob@khobbits.co.uk>2012-01-28 01:09:02 +0000
commite6d525a1687d254086c8a2dfcfa518355f6192bd (patch)
tree3a41ca7ce6c8fb7e79deea1a36a026d0312c584e
parente82ee71bd93ee076485788a67ff9b9577ddc3cdf (diff)
downloadEssentials-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.java6
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());
}
}