diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandnear.java b/Essentials/src/com/earth2me/essentials/commands/Commandnear.java index f999e68a3..b099c331b 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandnear.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandnear.java @@ -19,7 +19,12 @@ public class Commandnear extends EssentialsCommand @Override protected void run(final Server server, final User user, final String commandLabel, final String[] args) throws Exception { - long radius = 200; + long chatRadius = ess.getSettings().getChatRadius(); + long radius = chatRadius; + if (radius == 0) + { + radius = 200; + } User otherUser = null; if (args.length > 0) @@ -49,6 +54,12 @@ public class Commandnear extends EssentialsCommand } } } + + if (radius > chatRadius && !user.isAuthorized("essentials.near.exemptradius")) + { + user.sendMessage(_("radiusTooBig", chatRadius)); + } + if (otherUser == null || user.isAuthorized("essentials.near.others")) { user.sendMessage(_("nearbyPlayers", getLocal(server, otherUser == null ? user : otherUser, radius))); diff --git a/Essentials/src/messages.properties b/Essentials/src/messages.properties index d7d4c3b13..94a87b453 100644 --- a/Essentials/src/messages.properties +++ b/Essentials/src/messages.properties @@ -521,3 +521,4 @@ inventoryClearFail=\u00a74Player {0} \u00a74does not have\u00a7c {1} \u00a74of\u localNoOne= totalSellableAll=\u00a7aThe total worth of all sellable items and blocks is \u00a7c{1}\u00a7a. totalSellableBlocks=\u00a7aThe total worth of all sellable blocks is \u00a7c{1}\u00a7a. +radiusTooBig=\u00a74Radius is too big! Maximum radius is {0}. diff --git a/Essentials/src/messages_cs.properties b/Essentials/src/messages_cs.properties index 9fc3bb4d9..6c5d8d56c 100644 --- a/Essentials/src/messages_cs.properties +++ b/Essentials/src/messages_cs.properties @@ -523,8 +523,7 @@ inventoryClearingAllArmor=\u00a76Odebrany vsechny polozky inventare a brnerni {0 inventoryClearingAllStack=\u00a76Odebrano vse\u00a7c {0} \u00a76z {1}\u00a76. inventoryClearingStack=\u00a76Odstraneno\u00a7c {0}\u00a7cz {1} \u00a76od {2}\u00a76. inventoryClearFail=\u00a74Hrac {0} \u00a74nema\u00a7c {1} \u00a74z\u00a7c {2}\u00a74. - - localNoOne= totalSellableAll=\u00a7aThe total worth of all sellable items and blocks is \u00a7c{1}\u00a7a. totalSellableBlocks=\u00a7aThe total worth of all sellable blocks is \u00a7c{1}\u00a7a. +radiusTooBig=\u00a74Radius is too big! Maximum radius is {0}. diff --git a/Essentials/src/messages_da.properties b/Essentials/src/messages_da.properties index 450090e02..3eb0eab75 100644 --- a/Essentials/src/messages_da.properties +++ b/Essentials/src/messages_da.properties @@ -521,3 +521,4 @@ inventoryClearFail=\u00a74Player {0} \u00a74does not have\u00a7c {1} \u00a74of\u localNoOne= totalSellableAll=\u00a7aThe total worth of all sellable items and blocks is \u00a7c{1}\u00a7a. totalSellableBlocks=\u00a7aThe total worth of all sellable blocks is \u00a7c{1}\u00a7a. +radiusTooBig=\u00a74Radius is too big! Maximum radius is {0}. diff --git a/Essentials/src/messages_de.properties b/Essentials/src/messages_de.properties index a21fe3c3a..eb1a8ac03 100644 --- a/Essentials/src/messages_de.properties +++ b/Essentials/src/messages_de.properties @@ -521,3 +521,4 @@ inventoryClearFail=\u00a74Spieler {0} \u00a74hat keine\u00a7c {1} {2}\u00a74. localNoOne= totalSellableAll=\u00a7aThe total worth of all sellable items and blocks is \u00a7c{1}\u00a7a. totalSellableBlocks=\u00a7aThe total worth of all sellable blocks is \u00a7c{1}\u00a7a. +radiusTooBig=\u00a74Radius is too big! Maximum radius is {0}. diff --git a/Essentials/src/messages_en.properties b/Essentials/src/messages_en.properties index d7d4c3b13..94a87b453 100644 --- a/Essentials/src/messages_en.properties +++ b/Essentials/src/messages_en.properties @@ -521,3 +521,4 @@ inventoryClearFail=\u00a74Player {0} \u00a74does not have\u00a7c {1} \u00a74of\u localNoOne= totalSellableAll=\u00a7aThe total worth of all sellable items and blocks is \u00a7c{1}\u00a7a. totalSellableBlocks=\u00a7aThe total worth of all sellable blocks is \u00a7c{1}\u00a7a. +radiusTooBig=\u00a74Radius is too big! Maximum radius is {0}. diff --git a/Essentials/src/messages_es.properties b/Essentials/src/messages_es.properties index eb4471278..500b955a2 100644 --- a/Essentials/src/messages_es.properties +++ b/Essentials/src/messages_es.properties @@ -521,3 +521,4 @@ inventoryClearFail=\u00a74Player {0} \u00a74does not have\u00a7c {1} \u00a74of\u localNoOne= totalSellableAll=\u00a7aThe total worth of all sellable items and blocks is \u00a7c{1}\u00a7a. totalSellableBlocks=\u00a7aThe total worth of all sellable blocks is \u00a7c{1}\u00a7a. +radiusTooBig=\u00a74Radius is too big! Maximum radius is {0}. diff --git a/Essentials/src/messages_fi.properties b/Essentials/src/messages_fi.properties index 6563291b7..fb71a715b 100644 --- a/Essentials/src/messages_fi.properties +++ b/Essentials/src/messages_fi.properties @@ -521,3 +521,4 @@ inventoryClearFail=\u00a74Player {0} \u00a74does not have\u00a7c {1} \u00a74of\u localNoOne= totalSellableAll=\u00a7aThe total worth of all sellable items and blocks is \u00a7c{1}\u00a7a. totalSellableBlocks=\u00a7aThe total worth of all sellable blocks is \u00a7c{1}\u00a7a. +radiusTooBig=\u00a74Radius is too big! Maximum radius is {0}. diff --git a/Essentials/src/messages_fr.properties b/Essentials/src/messages_fr.properties index b238eb1b3..2e5a98c37 100644 --- a/Essentials/src/messages_fr.properties +++ b/Essentials/src/messages_fr.properties @@ -521,3 +521,4 @@ inventoryClearFail=\u00a74Le joueur {0} \u00a74n''a pas\u00a7c {1}\u00a7c {2}\u0 localNoOne= totalSellableAll=\u00a7aThe total worth of all sellable items and blocks is \u00a7c{1}\u00a7a. totalSellableBlocks=\u00a7aThe total worth of all sellable blocks is \u00a7c{1}\u00a7a. +radiusTooBig=\u00a74Radius is too big! Maximum radius is {0}. diff --git a/Essentials/src/messages_it.properties b/Essentials/src/messages_it.properties index 1e36f0488..6f76ba3b7 100644 --- a/Essentials/src/messages_it.properties +++ b/Essentials/src/messages_it.properties @@ -521,3 +521,4 @@ inventoryClearFail=\u00a74Player {0} \u00a74does not have\u00a7c {1} \u00a74of\u localNoOne= totalSellableAll=\u00a7aThe total worth of all sellable items and blocks is \u00a7c{1}\u00a7a. totalSellableBlocks=\u00a7aThe total worth of all sellable blocks is \u00a7c{1}\u00a7a. +radiusTooBig=\u00a74Radius is too big! Maximum radius is {0}. diff --git a/Essentials/src/messages_nl.properties b/Essentials/src/messages_nl.properties index c36688ae3..8287f826c 100644 --- a/Essentials/src/messages_nl.properties +++ b/Essentials/src/messages_nl.properties @@ -521,3 +521,4 @@ inventoryClearFail=\u00a74Player {0} \u00a74heeft geen\u00a7c {1} \u00a74stuks\u localNoOne= totalSellableAll=\u00a7aThe total worth of all sellable items and blocks is \u00a7c{1}\u00a7a. totalSellableBlocks=\u00a7aThe total worth of all sellable blocks is \u00a7c{1}\u00a7a. +radiusTooBig=\u00a74Radius is too big! Maximum radius is {0}. diff --git a/Essentials/src/messages_pl.properties b/Essentials/src/messages_pl.properties index f8151982e..ea64d414e 100644 --- a/Essentials/src/messages_pl.properties +++ b/Essentials/src/messages_pl.properties @@ -521,3 +521,4 @@ inventoryClearFail=\u00a74Player {0} \u00a74does not have\u00a7c {1} \u00a74of\u localNoOne= totalSellableAll=\u00a7aThe total worth of all sellable items and blocks is \u00a7c{1}\u00a7a. totalSellableBlocks=\u00a7aThe total worth of all sellable blocks is \u00a7c{1}\u00a7a. +radiusTooBig=\u00a74Radius is too big! Maximum radius is {0}. diff --git a/Essentials/src/messages_pt.properties b/Essentials/src/messages_pt.properties index 8666abdc2..24b8edcb6 100644 --- a/Essentials/src/messages_pt.properties +++ b/Essentials/src/messages_pt.properties @@ -521,3 +521,4 @@ inventoryClearFail=\u00a74Player {0} \u00a74does not have\u00a7c {1} \u00a74of\u localNoOne= totalSellableAll=\u00a7aThe total worth of all sellable items and blocks is \u00a7c{1}\u00a7a. totalSellableBlocks=\u00a7aThe total worth of all sellable blocks is \u00a7c{1}\u00a7a. +radiusTooBig=\u00a74Radius is too big! Maximum radius is {0}. diff --git a/Essentials/src/messages_ro.properties b/Essentials/src/messages_ro.properties index d02121153..229bfcacf 100644 --- a/Essentials/src/messages_ro.properties +++ b/Essentials/src/messages_ro.properties @@ -521,3 +521,4 @@ inventoryClearFail=\u00a74Player {0} \u00a74does not have\u00a7c {1} \u00a74of\u localNoOne= totalSellableAll=\u00a7aThe total worth of all sellable items and blocks is \u00a7c{1}\u00a7a. totalSellableBlocks=\u00a7aThe total worth of all sellable blocks is \u00a7c{1}\u00a7a. +radiusTooBig=\u00a74Radius is too big! Maximum radius is {0}. diff --git a/Essentials/src/messages_sv.properties b/Essentials/src/messages_sv.properties index 485d73f74..2cee31e95 100644 --- a/Essentials/src/messages_sv.properties +++ b/Essentials/src/messages_sv.properties @@ -521,3 +521,4 @@ inventoryClearFail=\u00a74Spelaren {0} \u00a74har inte \u00a7c {1} \u00a74av\u00 localNoOne= totalSellableAll=\u00a7aThe total worth of all sellable items and blocks is \u00a7c{1}\u00a7a. totalSellableBlocks=\u00a7aThe total worth of all sellable blocks is \u00a7c{1}\u00a7a. +radiusTooBig=\u00a74Radius is too big! Maximum radius is {0}. diff --git a/Essentials/src/messages_zh.properties b/Essentials/src/messages_zh.properties index 96f02c1a3..eb0e7950f 100644 --- a/Essentials/src/messages_zh.properties +++ b/Essentials/src/messages_zh.properties @@ -521,3 +521,4 @@ inventoryClearFail=\u00a74Player {0} \u00a74does not have\u00a7c {1} \u00a74of\u localNoOne= totalSellableAll=\u00a7aThe total worth of all sellable items and blocks is \u00a7c{1}\u00a7a. totalSellableBlocks=\u00a7aThe total worth of all sellable blocks is \u00a7c{1}\u00a7a. +radiusTooBig=\u00a74Radius is too big! Maximum radius is {0}. diff --git a/Essentials/src/messages_zh_HK.properties b/Essentials/src/messages_zh_HK.properties index a1ee38a73..68aef0be5 100644 --- a/Essentials/src/messages_zh_HK.properties +++ b/Essentials/src/messages_zh_HK.properties @@ -521,3 +521,4 @@ inventoryClearFail=\u00a74Player {0} \u00a74does not have\u00a7c {1} \u00a74of\u localNoOne= totalSellableAll=\u00a7aThe total worth of all sellable items and blocks is \u00a7c{1}\u00a7a. totalSellableBlocks=\u00a7aThe total worth of all sellable blocks is \u00a7c{1}\u00a7a. +radiusTooBig=\u00a74Radius is too big! Maximum radius is {0}. diff --git a/Essentials/src/messages_zh_TW.properties b/Essentials/src/messages_zh_TW.properties index c1e58f925..f3a9cbce7 100644 --- a/Essentials/src/messages_zh_TW.properties +++ b/Essentials/src/messages_zh_TW.properties @@ -521,3 +521,4 @@ inventoryClearFail=\u00a74Player {0} \u00a74does not have\u00a7c {1} \u00a74of\u localNoOne= totalSellableAll=\u00a7aThe total worth of all sellable items and blocks is \u00a7c{1}\u00a7a. totalSellableBlocks=\u00a7aThe total worth of all sellable blocks is \u00a7c{1}\u00a7a. +radiusTooBig=\u00a74Radius is too big! Maximum radius is {0}.