diff options
author | KHobbits <rob@khobbits.co.uk> | 2013-06-19 21:20:58 +0100 |
---|---|---|
committer | KHobbits <rob@khobbits.co.uk> | 2013-06-19 21:20:58 +0100 |
commit | 903e44f1581aa1389f78eee980d48295895750f2 (patch) | |
tree | 3ba597f8d9520131aac5ff7998039d903ed880c4 | |
parent | 25d04f88d45d16c61dbaf64a8a8627220cc2a309 (diff) | |
download | Essentials-903e44f1581aa1389f78eee980d48295895750f2.tar Essentials-903e44f1581aa1389f78eee980d48295895750f2.tar.gz Essentials-903e44f1581aa1389f78eee980d48295895750f2.tar.lz Essentials-903e44f1581aa1389f78eee980d48295895750f2.tar.xz Essentials-903e44f1581aa1389f78eee980d48295895750f2.zip |
[Fix] Don't throw the wrong error message when using group limited kit signs.
-rw-r--r-- | Essentials/src/com/earth2me/essentials/OfflinePlayer.java | 4 | ||||
-rw-r--r-- | Essentials/src/com/earth2me/essentials/signs/SignKit.java | 9 | ||||
-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, 26 insertions, 4 deletions
diff --git a/Essentials/src/com/earth2me/essentials/OfflinePlayer.java b/Essentials/src/com/earth2me/essentials/OfflinePlayer.java index 0be809f63..b8790ab00 100644 --- a/Essentials/src/com/earth2me/essentials/OfflinePlayer.java +++ b/Essentials/src/com/earth2me/essentials/OfflinePlayer.java @@ -740,13 +740,13 @@ public class OfflinePlayer implements Player @Override public void setPlayerListName(String name) { - throw new UnsupportedOperationException("Not supported yet."); + } @Override public String getPlayerListName() { - throw new UnsupportedOperationException("Not supported yet."); + return getName(); } @Override diff --git a/Essentials/src/com/earth2me/essentials/signs/SignKit.java b/Essentials/src/com/earth2me/essentials/signs/SignKit.java index 5616a969c..e319a4838 100644 --- a/Essentials/src/com/earth2me/essentials/signs/SignKit.java +++ b/Essentials/src/com/earth2me/essentials/signs/SignKit.java @@ -50,7 +50,7 @@ public class SignKit extends EssentialsSign protected boolean onSignInteract(final ISign sign, final User player, final String username, final IEssentials ess) throws SignException, ChargeException { final String kitName = sign.getLine(1).toLowerCase(Locale.ENGLISH).trim(); - final String group = sign.getLine(2); + final String group = sign.getLine(2).trim(); if ((!group.isEmpty() && ("ยง2Everyone".equals(group) || player.inGroup(group))) || (group.isEmpty() && (player.isAuthorized("essentials.kits." + kitName)))) { @@ -77,7 +77,12 @@ public class SignKit extends EssentialsSign } else { - throw new SignException(_("noKitPermission", "essentials.kits." + kitName)); + if (group.isEmpty()) { + throw new SignException(_("noKitPermission", "essentials.kits." + kitName)); + } + else { + throw new SignException(_("noKitGroup", group)); + } } } } diff --git a/Essentials/src/messages.properties b/Essentials/src/messages.properties index 2abfcd66e..ef1e740a5 100644 --- a/Essentials/src/messages.properties +++ b/Essentials/src/messages.properties @@ -542,3 +542,4 @@ youAreHealed=\u00a76You have been healed. youHaveNewMail=\u00a76You have\u00a7c {0} \u00a76messages! Type \u00a7c/mail read\u00a76 to view your mail. whoisHunger=\u00a76 - Hunger:\u00a7r {0}/20 (+{1} saturation) kitDelay=\u00a7m{0}\u00a7r +noKitGroup=\u00a74You do not have access to this kit. diff --git a/Essentials/src/messages_cs.properties b/Essentials/src/messages_cs.properties index bba5c40b4..a4312b9f1 100644 --- a/Essentials/src/messages_cs.properties +++ b/Essentials/src/messages_cs.properties @@ -546,3 +546,4 @@ youHaveNewMail=\u00a7cMas {0} zprav!\u00a7f Napis \u00a77/mail read\u00a7f aby j whoisHunger=\u00a76 - Hunger:\u00a7r {0}/20 (+{1} saturation) kitDelay=\u00a7m{0}\u00a7r giveSpawnFailure=\u00a74Not enough space, \u00a7c{0} \u00a7c{1} \u00a74was lost. +noKitGroup=\u00a74You do not have access to this kit. diff --git a/Essentials/src/messages_da.properties b/Essentials/src/messages_da.properties index dd8f43e33..c19bf956f 100644 --- a/Essentials/src/messages_da.properties +++ b/Essentials/src/messages_da.properties @@ -542,3 +542,4 @@ youHaveNewMail=\u00a7cDu har {0} flaskeposter!\u00a7f Type \u00a77/mail read for whoisHunger=\u00a76 - Hunger:\u00a7r {0}/20 (+{1} saturation) kitDelay=\u00a7m{0}\u00a7r giveSpawnFailure=\u00a74Not enough space, \u00a7c{0} \u00a7c{1} \u00a74was lost. +noKitGroup=\u00a74You do not have access to this kit. diff --git a/Essentials/src/messages_de.properties b/Essentials/src/messages_de.properties index fe1557dd7..eb13ac566 100644 --- a/Essentials/src/messages_de.properties +++ b/Essentials/src/messages_de.properties @@ -542,3 +542,4 @@ youHaveNewMail=\u00a7cDu hast {0} Nachrichten!\u00a7f Schreibe \u00a77/mail read whoisHunger=\u00a76 - Hunger:\u00a7r {0}/20 (+{1} saturation) kitDelay=\u00a7m{0}\u00a7r giveSpawnFailure=\u00a74Not enough space, \u00a7c{0} \u00a7c{1} \u00a74was lost. +noKitGroup=\u00a74You do not have access to this kit. diff --git a/Essentials/src/messages_en.properties b/Essentials/src/messages_en.properties index fbcb40552..0a878c587 100644 --- a/Essentials/src/messages_en.properties +++ b/Essentials/src/messages_en.properties @@ -542,3 +542,4 @@ youHaveNewMail=\u00a76You have\u00a7c {0} \u00a76messages! Type \u00a7c/mail rea whoisHunger=\u00a76 - Hunger:\u00a7r {0}/20 (+{1} saturation) kitDelay=\u00a7m{0}\u00a7r giveSpawnFailure=\u00a74Not enough space, \u00a7c{0} \u00a7c{1} \u00a74was lost. +noKitGroup=\u00a74You do not have access to this kit. diff --git a/Essentials/src/messages_es.properties b/Essentials/src/messages_es.properties index a5752d2f8..6775cee6f 100644 --- a/Essentials/src/messages_es.properties +++ b/Essentials/src/messages_es.properties @@ -542,3 +542,4 @@ youHaveNewMail=\u00a7cTienes {0} mensajes!\u00a7f Pon \u00a77/mail read\u00a7f p whoisHunger=\u00a76 - Hunger:\u00a7r {0}/20 (+{1} saturation) kitDelay=\u00a7m{0}\u00a7r giveSpawnFailure=\u00a74Not enough space, \u00a7c{0} \u00a7c{1} \u00a74was lost. +noKitGroup=\u00a74You do not have access to this kit. diff --git a/Essentials/src/messages_fi.properties b/Essentials/src/messages_fi.properties index c0ae60764..628629f6e 100644 --- a/Essentials/src/messages_fi.properties +++ b/Essentials/src/messages_fi.properties @@ -542,3 +542,4 @@ youHaveNewMail=\u00a7cSinulla on {0} viesti(\u00e4)!\u00a7f Kirjoita \u00a77/mai whoisHunger=\u00a76 - Hunger:\u00a7r {0}/20 (+{1} saturation) kitDelay=\u00a7m{0}\u00a7r giveSpawnFailure=\u00a74Not enough space, \u00a7c{0} \u00a7c{1} \u00a74was lost. +noKitGroup=\u00a74You do not have access to this kit. diff --git a/Essentials/src/messages_fr.properties b/Essentials/src/messages_fr.properties index 3eac09940..0aa17b3fa 100644 --- a/Essentials/src/messages_fr.properties +++ b/Essentials/src/messages_fr.properties @@ -542,3 +542,4 @@ youHaveNewMail=\u00a7cVous avez {0} message(s) ! \u00a7fEntrez \u00a77/mail read whoisHunger=\u00a76 - Faim :\u00a7r {0}/20 (+{1} saturation) kitDelay=\u00a7m{0}\u00a7r giveSpawnFailure=\u00a74Not enough space, \u00a7c{0} \u00a7c{1} \u00a74was lost. +noKitGroup=\u00a74You do not have access to this kit. diff --git a/Essentials/src/messages_it.properties b/Essentials/src/messages_it.properties index 871aef845..b91cc92f0 100644 --- a/Essentials/src/messages_it.properties +++ b/Essentials/src/messages_it.properties @@ -542,3 +542,4 @@ youHaveNewMail=\u00a7cHai {0} messaggi!\u00a7f digita \u00a77/mail read\u00a7f p whoisHunger=\u00a76 - Hunger:\u00a7r {0}/20 (+{1} saturation) kitDelay=\u00a7m{0}\u00a7r giveSpawnFailure=\u00a74Not enough space, \u00a7c{0} \u00a7c{1} \u00a74was lost. +noKitGroup=\u00a74You do not have access to this kit. diff --git a/Essentials/src/messages_nl.properties b/Essentials/src/messages_nl.properties index 4c8f2f9cd..9a6f94d5e 100644 --- a/Essentials/src/messages_nl.properties +++ b/Essentials/src/messages_nl.properties @@ -542,3 +542,4 @@ youHaveNewMail=\u00a7cJe hebt {0} berichten!\u00a7f Type \u00a77/mail read\u00a7 whoisHunger=\u00a76 - Hunger:\u00a7r {0}/20 (+{1} saturation) kitDelay=\u00a7m{0}\u00a7r giveSpawnFailure=\u00a74Not enough space, \u00a7c{0} \u00a7c{1} \u00a74was lost. +noKitGroup=\u00a74You do not have access to this kit. diff --git a/Essentials/src/messages_pl.properties b/Essentials/src/messages_pl.properties index b39e71edb..dbdb9506b 100644 --- a/Essentials/src/messages_pl.properties +++ b/Essentials/src/messages_pl.properties @@ -542,3 +542,4 @@ youHaveNewMail=\u00a77Masz\u00a7c {0} \u00a77wiadomosci! Wpisz \u00a7c/mail read whoisHunger=\u00a76 - Hunger:\u00a7r {0}/20 (+{1} saturation) kitDelay=\u00a7m{0}\u00a7r giveSpawnFailure=\u00a74Not enough space, \u00a7c{0} \u00a7c{1} \u00a74was lost. +noKitGroup=\u00a74You do not have access to this kit. diff --git a/Essentials/src/messages_pt.properties b/Essentials/src/messages_pt.properties index 10b9bb9b0..25f67e68b 100644 --- a/Essentials/src/messages_pt.properties +++ b/Essentials/src/messages_pt.properties @@ -542,3 +542,4 @@ youHaveNewMail=\u00a76Voc\u00c3\u00aa tem\u00a7c {0} \u00a76mensagens! Digite \u whoisHunger=\u00a76 - Hunger:\u00a7r {0}/20 (+{1} saturation) kitDelay=\u00a7m{0}\u00a7r giveSpawnFailure=\u00a74Not enough space, \u00a7c{0} \u00a7c{1} \u00a74was lost. +noKitGroup=\u00a74You do not have access to this kit. diff --git a/Essentials/src/messages_ro.properties b/Essentials/src/messages_ro.properties index 51bf0e748..8eb66690c 100644 --- a/Essentials/src/messages_ro.properties +++ b/Essentials/src/messages_ro.properties @@ -542,3 +542,4 @@ youHaveNewMail=\u00a76Ai\u00a7c {0} \u00a76mesaje! scrie \u00a7c/mail read\u00a7 whoisHunger=\u00a76 - Hunger:\u00a7r {0}/20 (+{1} saturation) kitDelay=\u00a7m{0}\u00a7r giveSpawnFailure=\u00a74Not enough space, \u00a7c{0} \u00a7c{1} \u00a74was lost. +noKitGroup=\u00a74You do not have access to this kit. diff --git a/Essentials/src/messages_se.properties b/Essentials/src/messages_se.properties index 788a1e08a..d38700c7b 100644 --- a/Essentials/src/messages_se.properties +++ b/Essentials/src/messages_se.properties @@ -542,3 +542,4 @@ youHaveNewMail=\u00a7cDu har {0} meddelanden!\u00a7f Skriv \u00a77/mail read\u00 whoisHunger=\u00a76 - Hunger:\u00a7r {0}/20 (+{1} saturation) kitDelay=\u00a7m{0}\u00a7r giveSpawnFailure=\u00a74Not enough space, \u00a7c{0} \u00a7c{1} \u00a74was lost. +noKitGroup=\u00a74You do not have access to this kit. diff --git a/Essentials/src/messages_zh.properties b/Essentials/src/messages_zh.properties index 9ff9160c7..de0dae40d 100644 --- a/Essentials/src/messages_zh.properties +++ b/Essentials/src/messages_zh.properties @@ -543,3 +543,4 @@ youHaveNewMail=\u00a76\u4f60\u62e5\u6709 \u00a7c{0}\u00a76 \u6761\u6d88\u606f\uf whoisHunger=\u00a76 - Hunger:\u00a7r {0}/20 (+{1} saturation) kitDelay=\u00a7m{0}\u00a7r giveSpawnFailure=\u00a74Not enough space, \u00a7c{0} \u00a7c{1} \u00a74was lost. +noKitGroup=\u00a74You do not have access to this kit. diff --git a/Essentials/src/messages_zh_HK.properties b/Essentials/src/messages_zh_HK.properties index ada10ae31..2f650eb5c 100644 --- a/Essentials/src/messages_zh_HK.properties +++ b/Essentials/src/messages_zh_HK.properties @@ -544,3 +544,4 @@ youHaveNewMail=\u00a76\u4f60\u64c1\u6709 \u00a7c{0}\u00a76 \u689d\u6d88\u606f\uf whoisHunger=\u00a76 - Hunger:\u00a7r {0}/20 (+{1} saturation) kitDelay=\u00a7m{0}\u00a7r giveSpawnFailure=\u00a74Not enough space, \u00a7c{0} \u00a7c{1} \u00a74was lost. +noKitGroup=\u00a74You do not have access to this kit. diff --git a/Essentials/src/messages_zh_TW.properties b/Essentials/src/messages_zh_TW.properties index 06a4f3621..d1eafacec 100644 --- a/Essentials/src/messages_zh_TW.properties +++ b/Essentials/src/messages_zh_TW.properties @@ -544,3 +544,4 @@ youHaveNewMail=\u00a76\u4f60\u64c1\u6709 \u00a7c{0}\u00a76 \u689d\u6d88\u606f\uf whoisHunger=\u00a76 - Hunger:\u00a7r {0}/20 (+{1} saturation) kitDelay=\u00a7m{0}\u00a7r giveSpawnFailure=\u00a74Not enough space, \u00a7c{0} \u00a7c{1} \u00a74was lost. +noKitGroup=\u00a74You do not have access to this kit. |