diff options
author | KHobbits <rob@khobbits.co.uk> | 2013-05-04 18:11:35 +0100 |
---|---|---|
committer | KHobbits <rob@khobbits.co.uk> | 2013-05-04 18:11:35 +0100 |
commit | b7acccfc8beee196e0ef3e970eb9a87a2f2f6896 (patch) | |
tree | 2903d23cad6a556fe740c6432d99d430b3ee6510 | |
parent | fbcfd4948b2fbf39b35228bd815c93bea846b344 (diff) | |
download | Essentials-b7acccfc8beee196e0ef3e970eb9a87a2f2f6896.tar Essentials-b7acccfc8beee196e0ef3e970eb9a87a2f2f6896.tar.gz Essentials-b7acccfc8beee196e0ef3e970eb9a87a2f2f6896.tar.lz Essentials-b7acccfc8beee196e0ef3e970eb9a87a2f2f6896.tar.xz Essentials-b7acccfc8beee196e0ef3e970eb9a87a2f2f6896.zip |
[Feature] Make /kit list kit costs if any are set.
-rw-r--r-- | Essentials/src/com/earth2me/essentials/Kit.java | 13 | ||||
-rw-r--r-- | Essentials/src/com/earth2me/essentials/commands/Commandfeed.java | 2 | ||||
-rw-r--r-- | Essentials/src/messages.properties | 1 | ||||
-rw-r--r-- | Essentials/src/messages_cs.properties | 1 | ||||
-rw-r--r-- | Essentials/src/messages_da.properties | 1 | ||||
-rw-r--r-- | Essentials/src/messages_de.properties | 1 | ||||
-rw-r--r-- | Essentials/src/messages_en.properties | 1 | ||||
-rw-r--r-- | Essentials/src/messages_es.properties | 1 | ||||
-rw-r--r-- | Essentials/src/messages_fi.properties | 1 | ||||
-rw-r--r-- | Essentials/src/messages_fr.properties | 1 | ||||
-rw-r--r-- | Essentials/src/messages_it.properties | 1 | ||||
-rw-r--r-- | Essentials/src/messages_nl.properties | 1 | ||||
-rw-r--r-- | Essentials/src/messages_pl.properties | 1 | ||||
-rw-r--r-- | Essentials/src/messages_pt.properties | 1 | ||||
-rw-r--r-- | Essentials/src/messages_ro.properties | 1 | ||||
-rw-r--r-- | Essentials/src/messages_se.properties | 1 | ||||
-rw-r--r-- | Essentials/src/messages_zh.properties | 1 | ||||
-rw-r--r-- | Essentials/src/messages_zh_HK.properties | 1 | ||||
-rw-r--r-- | Essentials/src/messages_zh_TW.properties | 1 |
19 files changed, 30 insertions, 2 deletions
diff --git a/Essentials/src/com/earth2me/essentials/Kit.java b/Essentials/src/com/earth2me/essentials/Kit.java index 571787384..55b85a779 100644 --- a/Essentials/src/com/earth2me/essentials/Kit.java +++ b/Essentials/src/com/earth2me/essentials/Kit.java @@ -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(); } diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandfeed.java b/Essentials/src/com/earth2me/essentials/commands/Commandfeed.java index 3dda416eb..592fa9eb4 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandfeed.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandfeed.java @@ -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); diff --git a/Essentials/src/messages.properties b/Essentials/src/messages.properties index c154f802a..eaff46d13 100644 --- a/Essentials/src/messages.properties +++ b/Essentials/src/messages.properties @@ -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}) diff --git a/Essentials/src/messages_cs.properties b/Essentials/src/messages_cs.properties index 7f568dbb0..ce2337922 100644 --- a/Essentials/src/messages_cs.properties +++ b/Essentials/src/messages_cs.properties @@ -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}) diff --git a/Essentials/src/messages_da.properties b/Essentials/src/messages_da.properties index a8b86efdb..2f5d2daa6 100644 --- a/Essentials/src/messages_da.properties +++ b/Essentials/src/messages_da.properties @@ -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}) diff --git a/Essentials/src/messages_de.properties b/Essentials/src/messages_de.properties index b20b8be96..f6e8ef6d5 100644 --- a/Essentials/src/messages_de.properties +++ b/Essentials/src/messages_de.properties @@ -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}) diff --git a/Essentials/src/messages_en.properties b/Essentials/src/messages_en.properties index c154f802a..eaff46d13 100644 --- a/Essentials/src/messages_en.properties +++ b/Essentials/src/messages_en.properties @@ -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}) diff --git a/Essentials/src/messages_es.properties b/Essentials/src/messages_es.properties index a91041427..aac5660e4 100644 --- a/Essentials/src/messages_es.properties +++ b/Essentials/src/messages_es.properties @@ -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}) diff --git a/Essentials/src/messages_fi.properties b/Essentials/src/messages_fi.properties index 6f27cdfb9..287f79ae6 100644 --- a/Essentials/src/messages_fi.properties +++ b/Essentials/src/messages_fi.properties @@ -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}) diff --git a/Essentials/src/messages_fr.properties b/Essentials/src/messages_fr.properties index 2aae7dcd3..8b7d30af6 100644 --- a/Essentials/src/messages_fr.properties +++ b/Essentials/src/messages_fr.properties @@ -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}) diff --git a/Essentials/src/messages_it.properties b/Essentials/src/messages_it.properties index 783c22eea..ce69a7c3b 100644 --- a/Essentials/src/messages_it.properties +++ b/Essentials/src/messages_it.properties @@ -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}) diff --git a/Essentials/src/messages_nl.properties b/Essentials/src/messages_nl.properties index fab44a12a..d137a679f 100644 --- a/Essentials/src/messages_nl.properties +++ b/Essentials/src/messages_nl.properties @@ -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}) diff --git a/Essentials/src/messages_pl.properties b/Essentials/src/messages_pl.properties index 9614e19be..f4230d89f 100644 --- a/Essentials/src/messages_pl.properties +++ b/Essentials/src/messages_pl.properties @@ -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}) diff --git a/Essentials/src/messages_pt.properties b/Essentials/src/messages_pt.properties index 561c80d05..2bf2f201b 100644 --- a/Essentials/src/messages_pt.properties +++ b/Essentials/src/messages_pt.properties @@ -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}) diff --git a/Essentials/src/messages_ro.properties b/Essentials/src/messages_ro.properties index d49247afc..29ccea481 100644 --- a/Essentials/src/messages_ro.properties +++ b/Essentials/src/messages_ro.properties @@ -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}) diff --git a/Essentials/src/messages_se.properties b/Essentials/src/messages_se.properties index 78c139d7c..a0f3f9c5c 100644 --- a/Essentials/src/messages_se.properties +++ b/Essentials/src/messages_se.properties @@ -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}) diff --git a/Essentials/src/messages_zh.properties b/Essentials/src/messages_zh.properties index 7582505c5..4fef1d1a0 100644 --- a/Essentials/src/messages_zh.properties +++ b/Essentials/src/messages_zh.properties @@ -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}) diff --git a/Essentials/src/messages_zh_HK.properties b/Essentials/src/messages_zh_HK.properties index 60ab8b327..283d450cc 100644 --- a/Essentials/src/messages_zh_HK.properties +++ b/Essentials/src/messages_zh_HK.properties @@ -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}) diff --git a/Essentials/src/messages_zh_TW.properties b/Essentials/src/messages_zh_TW.properties index a37ab18dc..6b3628de7 100644 --- a/Essentials/src/messages_zh_TW.properties +++ b/Essentials/src/messages_zh_TW.properties @@ -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}) |