summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKHobbits <rob@khobbits.co.uk>2013-07-15 23:15:35 +0100
committerKHobbits <rob@khobbits.co.uk>2013-07-15 23:15:35 +0100
commitba6fd95247cdb455a7395c5583fc459e157c0bdd (patch)
treecb2389c87cd6dcc4f4afb5c6cbbe4ee949ebdc0f
parent419f51636aabb4ee958c2f564196b635ca2126be (diff)
downloadEssentials-ba6fd95247cdb455a7395c5583fc459e157c0bdd.tar
Essentials-ba6fd95247cdb455a7395c5583fc459e157c0bdd.tar.gz
Essentials-ba6fd95247cdb455a7395c5583fc459e157c0bdd.tar.lz
Essentials-ba6fd95247cdb455a7395c5583fc459e157c0bdd.tar.xz
Essentials-ba6fd95247cdb455a7395c5583fc459e157c0bdd.zip
Fix radius logic
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandnear.java15
1 files changed, 9 insertions, 6 deletions
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandnear.java b/Essentials/src/com/earth2me/essentials/commands/Commandnear.java
index b099c331b..1f1f812b8 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandnear.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandnear.java
@@ -19,12 +19,15 @@ public class Commandnear extends EssentialsCommand
@Override
protected void run(final Server server, final User user, final String commandLabel, final String[] args) throws Exception
{
- long chatRadius = ess.getSettings().getChatRadius();
- long radius = chatRadius;
- if (radius == 0)
+ long maxRadius = ess.getSettings().getChatRadius();
+
+ if (maxRadius == 0)
{
- radius = 200;
+ maxRadius = 200;
}
+
+ long radius = maxRadius;
+
User otherUser = null;
if (args.length > 0)
@@ -55,9 +58,9 @@ public class Commandnear extends EssentialsCommand
}
}
- if (radius > chatRadius && !user.isAuthorized("essentials.near.exemptradius"))
+ if (radius > maxRadius && !user.isAuthorized("essentials.near.maxexempt"))
{
- user.sendMessage(_("radiusTooBig", chatRadius));
+ user.sendMessage(_("radiusTooBig", maxRadius));
}
if (otherUser == null || user.isAuthorized("essentials.near.others"))