summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Essentials/src/com/earth2me/essentials/Util.java2
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandunban.java15
2 files changed, 13 insertions, 4 deletions
diff --git a/Essentials/src/com/earth2me/essentials/Util.java b/Essentials/src/com/earth2me/essentials/Util.java
index 6ec5f4180..614e9b2b9 100644
--- a/Essentials/src/com/earth2me/essentials/Util.java
+++ b/Essentials/src/com/earth2me/essentials/Util.java
@@ -252,7 +252,7 @@ public class Util
{
y = 127;
x += 1;
- if (x - 16 > loc.getBlockX())
+ if (x - 32 > loc.getBlockX())
{
throw new Exception(Util.i18n("holeInFloor"));
}
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandunban.java b/Essentials/src/com/earth2me/essentials/commands/Commandunban.java
index 88e7f10ba..2cf4e78d0 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandunban.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandunban.java
@@ -20,9 +20,18 @@ public class Commandunban extends EssentialsCommand
{
throw new NotEnoughArgumentsException();
}
-
- User u = getPlayer(server, args, 0, true);
- ess.getBans().unbanByName(u.getName());
+
+ String name;
+ try
+ {
+ User u = getPlayer(server, args, 0, true);
+ name = u.getName();
+ }
+ catch (NoSuchFieldException e)
+ {
+ name = args[0];
+ }
+ ess.getBans().unbanByName(name);
sender.sendMessage(Util.i18n("unbannedPlayer"));
}
}