[Feature] Make /kit list kit costs if any are set.

This commit is contained in:
KHobbits 2013-05-04 18:11:35 +01:00
parent fbcfd4948b
commit b7acccfc8b
19 changed files with 30 additions and 2 deletions

View File

@ -24,10 +24,21 @@ public class Kit
final StringBuilder list = new StringBuilder();
for (String kiteItem : kits.getKeys(false))
{
if (user == null || user.isAuthorized("essentials.kits." + kiteItem.toLowerCase(Locale.ENGLISH)))
if (user == null)
{
list.append(" ").append(capitalCase(kiteItem));
}
else if (user.isAuthorized("essentials.kits." + kiteItem.toLowerCase(Locale.ENGLISH)))
{
String cost = "";
Double costPrice = new Trade("kit-" + kiteItem.toLowerCase(Locale.ENGLISH), ess).getCommandCost(user);
if (costPrice > 0d)
{
cost = _("kitCost", Util.displayCurrency(costPrice, ess));
}
list.append(" ").append(capitalCase(kiteItem)).append(cost);
}
}
return list.toString().trim();
}

View File

@ -64,7 +64,7 @@ public class Commandfeed extends EssentialsCommand
private void feedPlayer(CommandSender sender, Player player) throws QuietAbortException
{
final int amount = 20;
final int amount = 100;
final FoodLevelChangeEvent flce = new FoodLevelChangeEvent(player, amount);
ess.getServer().getPluginManager().callEvent(flce);

View File

@ -538,3 +538,4 @@ socialSpy=\u00a76SocialSpy for {0}\u00a76: {1}
setBal=\u00a7aYour balance was set to {0}.
setBalOthers=\u00a7aYou set {0}\u00a7a''s balance to {1}.
insufficientFunds=\u00a74Insufficient funds available.
kitCost=\ ({0})

View File

@ -541,3 +541,4 @@ socialSpy=\u00a76SocialSpy for {0}\u00a76: {1}
setBal=\u00a7aYour balance was set to {0}.
setBalOthers=\u00a7aYou set {0}\u00a7a''s balance to {1}.
insufficientFunds=\u00a74Insufficient funds available.
kitCost=\ ({0})

View File

@ -538,3 +538,4 @@ socialSpy=\u00a76SocialSpy for {0}\u00a76: {1}
setBal=\u00a7aYour balance was set to {0}.
setBalOthers=\u00a7aYou set {0}\u00a7a''s balance to {1}.
insufficientFunds=\u00a74Insufficient funds available.
kitCost=\ ({0})

View File

@ -538,3 +538,4 @@ socialSpy=\u00a76SocialSpy for {0}\u00a76: {1}
setBal=\u00a7aYour balance was set to {0}.
setBalOthers=\u00a7aYou set {0}\u00a7a''s balance to {1}.
insufficientFunds=\u00a74Insufficient funds available.
kitCost=\ ({0})

View File

@ -538,3 +538,4 @@ socialSpy=\u00a76SocialSpy for {0}\u00a76: {1}
setBal=\u00a7aYour balance was set to {0}.
setBalOthers=\u00a7aYou set {0}\u00a7a''s balance to {1}.
insufficientFunds=\u00a74Insufficient funds available.
kitCost=\ ({0})

View File

@ -538,3 +538,4 @@ socialSpy=\u00a76SocialSpy for {0}\u00a76: {1}
setBal=\u00a7aYour balance was set to {0}.
setBalOthers=\u00a7aYou set {0}\u00a7a''s balance to {1}.
insufficientFunds=\u00a74Insufficient funds available.
kitCost=\ ({0})

View File

@ -538,3 +538,4 @@ socialSpy=\u00a76SocialSpy for {0}\u00a76: {1}
setBal=\u00a7aYour balance was set to {0}.
setBalOthers=\u00a7aYou set {0}\u00a7a''s balance to {1}.
insufficientFunds=\u00a74Insufficient funds available.
kitCost=\ ({0})

View File

@ -538,3 +538,4 @@ socialSpy=\u00a76SocialSpy for {0}\u00a76: {1}
setBal=\u00a7aYour balance was set to {0}.
setBalOthers=\u00a7aYou set {0}\u00a7a''s balance to {1}.
insufficientFunds=\u00a74Insufficient funds available.
kitCost=\ ({0})

View File

@ -538,3 +538,4 @@ socialSpy=\u00a76SocialSpy for {0}\u00a76: {1}
setBal=\u00a7aYour balance was set to {0}.
setBalOthers=\u00a7aYou set {0}\u00a7a''s balance to {1}.
insufficientFunds=\u00a74Insufficient funds available.
kitCost=\ ({0})

View File

@ -538,3 +538,4 @@ socialSpy=\u00a76SocialSpy for {0}\u00a76: {1}
setBal=\u00a7aYour balance was set to {0}.
setBalOthers=\u00a7aYou set {0}\u00a7a''s balance to {1}.
insufficientFunds=\u00a74Insufficient funds available.
kitCost=\ ({0})

View File

@ -538,3 +538,4 @@ socialSpy=\u00a77SocialSpy dla {0}\u00a76: {1}
setBal=\u00a7aTwoj stan konta ustawiono na {0}.
setBalOthers=\u00a7aYou set {0}\u00a7a''s balance to {1}.
insufficientFunds=\u00a74Nie posiadasz wystarczajacych srodkow.
kitCost=\ ({0})

View File

@ -537,3 +537,4 @@ socialSpy=\u00a76SocialSpy for {0}\u00a76: {1}
setBal=\u00a7aYour balance was set to {0}.
setBalOthers=\u00a7aYou set {0}\u00a7a''s balance to {1}.
insufficientFunds=\u00a74Insufficient funds available.
kitCost=\ ({0})

View File

@ -538,3 +538,4 @@ socialSpy=\u00a76SocialSpy for {0}\u00a76: {1}
setBal=\u00a7aYour balance was set to {0}.
setBalOthers=\u00a7aYou set {0}\u00a7a''s balance to {1}.
insufficientFunds=\u00a74Insufficient funds available.
kitCost=\ ({0})

View File

@ -538,3 +538,4 @@ socialSpy=\u00a76SocialSpy for {0}\u00a76: {1}
setBal=\u00a7aYour balance was set to {0}.
setBalOthers=\u00a7aYou set {0}\u00a7a''s balance to {1}.
insufficientFunds=\u00a74Insufficient funds available.
kitCost=\ ({0})

View File

@ -547,3 +547,4 @@ bookTitleSet=\u00a76Title of the book set to {0}.
insufficientFunds=\u00a74Insufficient funds available.
setBal=\u00a7aYour balance was set to {0}.
setBalOthers=\u00a7aYou set {0}\u00a7a''s balance to {1}.
kitCost=\ ({0})

View File

@ -547,3 +547,4 @@ bookTitleSet=\u00a76Title of the book set to {0}.
insufficientFunds=\u00a74Insufficient funds available.
setBal=\u00a7aYour balance was set to {0}.
setBalOthers=\u00a7aYou set {0}\u00a7a''s balance to {1}.
kitCost=\ ({0})

View File

@ -547,3 +547,4 @@ bookTitleSet=\u00a76Title of the book set to {0}.
insufficientFunds=\u00a74Insufficient funds available.
setBal=\u00a7aYour balance was set to {0}.
setBalOthers=\u00a7aYou set {0}\u00a7a''s balance to {1}.
kitCost=\ ({0})