Max near radius

This commit is contained in:
Necrodoom 2013-07-15 12:20:04 +03:00 committed by KHobbits
parent f6f71126a1
commit 419f51636a
18 changed files with 29 additions and 3 deletions

View File

@ -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)));

View File

@ -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}.

View File

@ -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}.

View File

@ -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}.

View File

@ -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}.

View File

@ -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}.

View File

@ -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}.

View File

@ -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}.

View File

@ -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}.

View File

@ -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}.

View File

@ -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}.

View File

@ -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}.

View File

@ -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}.

View File

@ -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}.

View File

@ -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}.

View File

@ -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}.

View File

@ -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}.

View File

@ -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}.