summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNecrodoom <doomed.war@gmail.com>2013-02-07 08:43:07 +0200
committerKHobbits <rob@khobbits.co.uk>2013-02-12 22:43:06 +0000
commit5390a65f1508da630455e412ed41bd21f128aeeb (patch)
treec7080cdf5ba440aac44663c890bea63ccb0cf84c
parent3452319a8b7826bdbf38430c7989bdcf6d719165 (diff)
downloadEssentials-5390a65f1508da630455e412ed41bd21f128aeeb.tar
Essentials-5390a65f1508da630455e412ed41bd21f128aeeb.tar.gz
Essentials-5390a65f1508da630455e412ed41bd21f128aeeb.tar.lz
Essentials-5390a65f1508da630455e412ed41bd21f128aeeb.tar.xz
Essentials-5390a65f1508da630455e412ed41bd21f128aeeb.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.java15
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)));
}