diff options
author | Necrodoom <doomed.war@gmail.com> | 2013-02-07 08:43:07 +0200 |
---|---|---|
committer | KHobbits <rob@khobbits.co.uk> | 2013-02-12 22:43:06 +0000 |
commit | 2a816cef7b289c550a8c80cda53e67bfbd10a2e0 (patch) | |
tree | 667c229edbf3ade559e900a5b7d73f70ebc71322 | |
parent | 911224dc6445ca26d1a7b380eaf3a12f9baa043a (diff) | |
download | Essentials-2a816cef7b289c550a8c80cda53e67bfbd10a2e0.tar Essentials-2a816cef7b289c550a8c80cda53e67bfbd10a2e0.tar.gz Essentials-2a816cef7b289c550a8c80cda53e67bfbd10a2e0.tar.lz Essentials-2a816cef7b289c550a8c80cda53e67bfbd10a2e0.tar.xz Essentials-2a816cef7b289c550a8c80cda53e67bfbd10a2e0.zip |
try improve bed spawn handle
dont act as if bed doesnt exist if its missing
-rw-r--r-- | Essentials/src/com/earth2me/essentials/commands/Commandhome.java | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandhome.java b/Essentials/src/com/earth2me/essentials/commands/Commandhome.java index c7a5dcd87..c2a796857 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandhome.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandhome.java @@ -52,6 +52,10 @@ public class Commandhome extends EssentialsCommand user.getTeleport().teleport(bed, charge, TeleportCause.COMMAND); throw new NoChargeException(); } + else + { + throw new Exception(_("bedmissing")); + } } goHome(user, player, homeName.toLowerCase(Locale.ENGLISH), charge); } @@ -73,9 +77,16 @@ public class Commandhome extends EssentialsCommand } else { - if (bed != null && user.isAuthorized("essentials.home.bed")) + if (user.isAuthorized("essentials.home.bed")) { - homes.add(_("bed")); + if (bed != null) + { + homes.add(_("bed")); + } + else + { + homes.add(_("bednull")); + } } user.sendMessage(_("homes", Util.joinList(homes))); } |