[Fix] Don't throw the wrong error message when using group limited kit signs.

This commit is contained in:
KHobbits 2013-06-19 21:20:58 +01:00
parent 8ae0ea98a3
commit f8fb8935d7
19 changed files with 26 additions and 4 deletions

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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