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
commit292b7b05466d651bb1f68c6755fd14e1d86f9281 (patch)
tree3635900f0ca3ebd4b06d3b6d3e452cc2ae7d87e7
parentd1d31e9769291e7c5e6ff93c55e588b88d5eb489 (diff)
downloadEssentials-292b7b05466d651bb1f68c6755fd14e1d86f9281.tar
Essentials-292b7b05466d651bb1f68c6755fd14e1d86f9281.tar.gz
Essentials-292b7b05466d651bb1f68c6755fd14e1d86f9281.tar.lz
Essentials-292b7b05466d651bb1f68c6755fd14e1d86f9281.tar.xz
Essentials-292b7b05466d651bb1f68c6755fd14e1d86f9281.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());
}
}