mirror of
https://github.com/EssentialsX/Essentials.git
synced 2025-02-05 23:11:48 +01:00
Fix potion effect errors
This commit is contained in:
parent
6185581962
commit
1111254e46
@ -349,21 +349,18 @@ public class MetaItemStack
|
||||
pEffectType = Potions.getByName(split[1]);
|
||||
if (pEffectType != null && pEffectType.getName() != null)
|
||||
{
|
||||
if (hasMetaPermission(sender, "potions." + pEffectType.getName().toLowerCase(Locale.ENGLISH), false, false, ess))
|
||||
if (hasMetaPermission(sender, "potions." + pEffectType.getName().toLowerCase(Locale.ENGLISH), true, false, ess))
|
||||
{
|
||||
validPotionEffect = true;
|
||||
canceledEffect = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
canceledEffect = true;
|
||||
sender.sendMessage(_("invalidPotionEffect", pEffectType.getName().toLowerCase(Locale.ENGLISH)));
|
||||
throw new Exception(_("noPotionEffectPerm", pEffectType.getName().toLowerCase(Locale.ENGLISH)));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
sender.sendMessage(_("invalidPotionEffect", split[1]));
|
||||
canceledEffect = true;
|
||||
throw new Exception(_("invalidPotionEffect", split[1]));
|
||||
}
|
||||
}
|
||||
else if (split[0].equalsIgnoreCase("power") || (allowShortName && split[0].equalsIgnoreCase("p")))
|
||||
@ -383,7 +380,7 @@ public class MetaItemStack
|
||||
}
|
||||
}
|
||||
|
||||
if (isValidPotion() && !canceledEffect)
|
||||
if (isValidPotion())
|
||||
{
|
||||
PotionMeta pmeta = (PotionMeta)stack.getItemMeta();
|
||||
pEffect = pEffectType.createEffect(duration, power);
|
||||
|
@ -47,6 +47,7 @@ public class Potions
|
||||
ALIASPOTIONS.put("instaheal", PotionEffectType.HEAL);
|
||||
|
||||
POTIONS.put("harm", PotionEffectType.HARM);
|
||||
ALIASPOTIONS.put("harming", PotionEffectType.HARM);
|
||||
ALIASPOTIONS.put("injure", PotionEffectType.HARM);
|
||||
ALIASPOTIONS.put("damage", PotionEffectType.HARM);
|
||||
ALIASPOTIONS.put("inflict", PotionEffectType.HARM);
|
||||
|
@ -178,7 +178,6 @@ invalidHomeName=\u00a74Invalid home name!
|
||||
invalidMob=Invalid mob type.
|
||||
invalidNumber=Invalid Number
|
||||
invalidPotion=\u00a74Invalid Potion
|
||||
invalidPotionEffect=\u00a74You do not have permissions to apply potion effect \u00a7c{0} \u00a74to this potion
|
||||
invalidServer=Invalid server!
|
||||
invalidSignLine=\u00a74Line\u00a7c {0} \u00a74on sign is invalid.
|
||||
invalidWarpName=\u00a74Invalid warp name!
|
||||
@ -520,3 +519,5 @@ youHaveNewMail=\u00a76You have\u00a7c {0} \u00a76messages! Type \u00a7c/mail rea
|
||||
playerUnbanned=\u00a76Player\u00a7c {0} \u00a76unbanned {1}.
|
||||
playerUnbanIpAddress=\u00a76Player\u00a7c {0} \u00a76unbanned IP: {1}.
|
||||
playerBanIpAddress=\u00a76Player\u00a7c {0} \u00a76banned IP address {1}\u00a76.
|
||||
noPotionEffectPerm=\u00a74You do not have permission to apply potion effect \u00a7c{0} \u00a74to this potion
|
||||
invalidPotionEffect=\u00a74Invalid potion effect \u00a7c{0}
|
||||
|
@ -181,7 +181,6 @@ invalidHomeName=\u00a74Invalid home name
|
||||
invalidMob=Nespravny typ moba.
|
||||
invalidNumber=Invalid Number
|
||||
invalidPotion=\u00a74Invalid Potion
|
||||
invalidPotionEffect=\u00a74You do not have permissions to apply potion effect \u00a7c{0} \u00a74to this potion
|
||||
invalidServer=Nespravny server!
|
||||
invalidSignLine=Radek {0} je chybne vyplnen.
|
||||
invalidWarpName=\u00a74Invalid warp name
|
||||
@ -523,3 +522,5 @@ youHaveNewMail=\u00a7cMas {0} zprav!\u00a7f Napis \u00a77/mail read\u00a7f aby j
|
||||
playerUnbanned=\u00a76Player\u00a7c {0} \u00a76unbanned {1}.
|
||||
playerUnbanIpAddress=\u00a76Player\u00a7c {0} \u00a76unbanned IP: {1}.
|
||||
playerBanIpAddress=\u00a76Player\u00a7c {0} \u00a76banned IP address {1}\u00a76.
|
||||
noPotionEffectPerm=\u00a74You do not have permission to apply potion effect \u00a7c{0} \u00a74to this potion
|
||||
invalidPotionEffect=\u00a74Invalid potion effect \u00a7c{0}
|
||||
|
@ -178,7 +178,6 @@ invalidHomeName=\u00a74Invalid home name
|
||||
invalidMob=Ugyldig mob type.
|
||||
invalidNumber=Invalid Number
|
||||
invalidPotion=\u00a74Invalid Potion
|
||||
invalidPotionEffect=\u00a74You do not have permissions to apply potion effect \u00a7c{0} \u00a74to this potion
|
||||
invalidServer=Ugyldig server!
|
||||
invalidSignLine=Linje {0} p\u00e5 skilt er ugyldig.
|
||||
invalidWarpName=\u00a74Invalid warp name
|
||||
@ -520,3 +519,5 @@ youHaveNewMail=\u00a7cDu har {0} flaskeposter!\u00a7f Type \u00a77/mail read for
|
||||
playerUnbanned=\u00a76Player\u00a7c {0} \u00a76unbanned {1}.
|
||||
playerUnbanIpAddress=\u00a76Player\u00a7c {0} \u00a76unbanned IP: {1}.
|
||||
playerBanIpAddress=\u00a76Player\u00a7c {0} \u00a76banned IP address {1}\u00a76.
|
||||
noPotionEffectPerm=\u00a74You do not have permission to apply potion effect \u00a7c{0} \u00a74to this potion
|
||||
invalidPotionEffect=\u00a74Invalid potion effect \u00a7c{0}
|
||||
|
@ -178,7 +178,6 @@ invalidHomeName=\u00a74Invalid home name
|
||||
invalidMob=Ung\u00fcltiger Monstername.
|
||||
invalidNumber=Invalid Number
|
||||
invalidPotion=\u00a74Invalid Potion
|
||||
invalidPotionEffect=\u00a74You do not have permissions to apply potion effect \u00a7c{0} \u00a74to this potion
|
||||
invalidServer=Ung\u00fcltiger Server!
|
||||
invalidSignLine=Die Zeile {0} auf dem Schild ist falsch.
|
||||
invalidWarpName=\u00a74Invalid warp name
|
||||
@ -520,3 +519,5 @@ youHaveNewMail=\u00a7cDu hast {0} Nachrichten!\u00a7f Schreibe \u00a77/mail read
|
||||
playerUnbanned=\u00a76Player\u00a7c {0} \u00a76unbanned {1}.
|
||||
playerUnbanIpAddress=\u00a76Player\u00a7c {0} \u00a76unbanned IP: {1}.
|
||||
playerBanIpAddress=\u00a76Player\u00a7c {0} \u00a76banned IP address {1}\u00a76.
|
||||
noPotionEffectPerm=\u00a74You do not have permission to apply potion effect \u00a7c{0} \u00a74to this potion
|
||||
invalidPotionEffect=\u00a74Invalid potion effect \u00a7c{0}
|
||||
|
@ -178,7 +178,6 @@ invalidHomeName=\u00a74Invalid home name!
|
||||
invalidMob=Invalid mob type.
|
||||
invalidNumber=Invalid Number
|
||||
invalidPotion=\u00a74Invalid Potion
|
||||
invalidPotionEffect=\u00a74You do not have permissions to apply potion effect \u00a7c{0} \u00a74to this potion
|
||||
invalidServer=Invalid server!
|
||||
invalidSignLine=\u00a74Line\u00a7c {0} \u00a74on sign is invalid.
|
||||
invalidWarpName=\u00a74Invalid warp name!
|
||||
@ -520,3 +519,5 @@ youHaveNewMail=\u00a76You have\u00a7c {0} \u00a76messages! Type \u00a7c/mail rea
|
||||
playerUnbanned=\u00a76Player\u00a7c {0} \u00a76unbanned {1}.
|
||||
playerUnbanIpAddress=\u00a76Player\u00a7c {0} \u00a76unbanned IP: {1}.
|
||||
playerBanIpAddress=\u00a76Player\u00a7c {0} \u00a76banned IP address {1}\u00a76.
|
||||
noPotionEffectPerm=\u00a74You do not have permission to apply potion effect \u00a7c{0} \u00a74to this potion
|
||||
invalidPotionEffect=\u00a74Invalid potion effect \u00a7c{0}
|
||||
|
@ -178,7 +178,6 @@ invalidHomeName=\u00a74Nombre de casa invalido
|
||||
invalidMob=Mob invalido.
|
||||
invalidNumber=Invalid Number
|
||||
invalidPotion=\u00a74Invalid Potion
|
||||
invalidPotionEffect=\u00a74You do not have permissions to apply potion effect \u00a7c{0} \u00a74to this potion
|
||||
invalidServer=Servidor invalido!
|
||||
invalidSignLine=Linea {0} en el signo es invalida.
|
||||
invalidWarpName=\u00a74Nombre de warp invalido
|
||||
@ -520,3 +519,5 @@ youHaveNewMail=\u00a7cTienes {0} mensajes!\u00a7f Pon \u00a77/mail read\u00a7f p
|
||||
playerUnbanned=\u00a76Player\u00a7c {0} \u00a76unbanned {1}.
|
||||
playerUnbanIpAddress=\u00a76Player\u00a7c {0} \u00a76unbanned IP: {1}.
|
||||
playerBanIpAddress=\u00a76Player\u00a7c {0} \u00a76banned IP address {1}\u00a76.
|
||||
noPotionEffectPerm=\u00a74You do not have permission to apply potion effect \u00a7c{0} \u00a74to this potion
|
||||
invalidPotionEffect=\u00a74Invalid potion effect \u00a7c{0}
|
||||
|
@ -178,7 +178,6 @@ invalidHomeName=\u00a74Invalid home name
|
||||
invalidMob=Kelvoton mobin tyyppi.
|
||||
invalidNumber=Invalid Number
|
||||
invalidPotion=\u00a74Invalid Potion
|
||||
invalidPotionEffect=\u00a74You do not have permissions to apply potion effect \u00a7c{0} \u00a74to this potion
|
||||
invalidServer=Kelvoton palvelin!
|
||||
invalidSignLine=Kyltin rivi {0} on viallinen.
|
||||
invalidWarpName=\u00a74Invalid warp name
|
||||
@ -520,3 +519,5 @@ youHaveNewMail=\u00a7cSinulla on {0} viesti(\u00e4)!\u00a7f Kirjoita \u00a77/mai
|
||||
playerUnbanned=\u00a76Player\u00a7c {0} \u00a76unbanned {1}.
|
||||
playerUnbanIpAddress=\u00a76Player\u00a7c {0} \u00a76unbanned IP: {1}.
|
||||
playerBanIpAddress=\u00a76Player\u00a7c {0} \u00a76banned IP address {1}\u00a76.
|
||||
noPotionEffectPerm=\u00a74You do not have permission to apply potion effect \u00a7c{0} \u00a74to this potion
|
||||
invalidPotionEffect=\u00a74Invalid potion effect \u00a7c{0}
|
||||
|
@ -178,7 +178,6 @@ invalidHomeName=\u00a74Nom de r\u00e9sindence invalide
|
||||
invalidMob=Mauvais type de cr\u00e9ature.
|
||||
invalidNumber=Invalid Number
|
||||
invalidPotion=\u00a74Invalid Potion
|
||||
invalidPotionEffect=\u00a74You do not have permissions to apply potion effect \u00a7c{0} \u00a74to this potion
|
||||
invalidServer=Serveur non valide.
|
||||
invalidSignLine=La ligne {0} du panneau est invalide.
|
||||
invalidWarpName=\u00a74Nom de warp invalide
|
||||
@ -520,3 +519,5 @@ youHaveNewMail=\u00a7cVous avez {0} messages ! \u00a7fEntrez \u00a77/mail read\u
|
||||
playerUnbanned=\u00a76Player\u00a7c {0} \u00a76unbanned {1}.
|
||||
playerUnbanIpAddress=\u00a76Player\u00a7c {0} \u00a76unbanned IP: {1}.
|
||||
playerBanIpAddress=\u00a76Player\u00a7c {0} \u00a76banned IP address {1}\u00a76.
|
||||
noPotionEffectPerm=\u00a74You do not have permission to apply potion effect \u00a7c{0} \u00a74to this potion
|
||||
invalidPotionEffect=\u00a74Invalid potion effect \u00a7c{0}
|
||||
|
@ -178,7 +178,6 @@ invalidHomeName=\u00a74Invalid home name
|
||||
invalidMob=Tipo mob non valido.
|
||||
invalidNumber=Invalid Number
|
||||
invalidPotion=\u00a74Invalid Potion
|
||||
invalidPotionEffect=\u00a74You do not have permissions to apply potion effect \u00a7c{0} \u00a74to this potion
|
||||
invalidServer=Server non valido!
|
||||
invalidSignLine=Riga {0} non corretta.
|
||||
invalidWarpName=\u00a74Invalid warp name
|
||||
@ -520,3 +519,5 @@ youHaveNewMail=\u00a7cHai {0} messaggi!\u00a7f digita \u00a77/mail read\u00a7f p
|
||||
playerUnbanned=\u00a76Player\u00a7c {0} \u00a76unbanned {1}.
|
||||
playerUnbanIpAddress=\u00a76Player\u00a7c {0} \u00a76unbanned IP: {1}.
|
||||
playerBanIpAddress=\u00a76Player\u00a7c {0} \u00a76banned IP address {1}\u00a76.
|
||||
noPotionEffectPerm=\u00a74You do not have permission to apply potion effect \u00a7c{0} \u00a74to this potion
|
||||
invalidPotionEffect=\u00a74Invalid potion effect \u00a7c{0}
|
||||
|
@ -178,7 +178,6 @@ invalidHomeName=\u00a74Invalid home name
|
||||
invalidMob=Ongeldig mob type.
|
||||
invalidNumber=Invalid Number
|
||||
invalidPotion=\u00a74Invalid Potion
|
||||
invalidPotionEffect=\u00a74You do not have permissions to apply potion effect \u00a7c{0} \u00a74to this potion
|
||||
invalidServer=Ongeldige server!
|
||||
invalidSignLine=Regel {0} op het bordje is ongeldig.
|
||||
invalidWarpName=\u00a74Invalid warp name
|
||||
@ -520,3 +519,5 @@ youHaveNewMail=\u00a7cJe hebt {0} berichten!\u00a7f Type \u00a77/mail read\u00a7
|
||||
playerUnbanned=\u00a76Player\u00a7c {0} \u00a76unbanned {1}.
|
||||
playerUnbanIpAddress=\u00a76Player\u00a7c {0} \u00a76unbanned IP: {1}.
|
||||
playerBanIpAddress=\u00a76Player\u00a7c {0} \u00a76banned IP address {1}\u00a76.
|
||||
invalidPotionEffect=\u00a74Invalid potion effect \u00a7c{0}
|
||||
noPotionEffectPerm=\u00a74You do not have permission to apply potion effect \u00a7c{0} \u00a74to this potion
|
||||
|
@ -178,7 +178,6 @@ invalidHomeName=\u00a74Niepoprawna nazwa domu.
|
||||
invalidMob=Niepoprawny typ moba.
|
||||
invalidNumber=Niepoprawny Numer
|
||||
invalidPotion=\u00a74Invalid Potion
|
||||
invalidPotionEffect=\u00a74You do not have permissions to apply potion effect \u00a7c{0} \u00a74to this potion
|
||||
invalidServer=Niepoprawny serwer!
|
||||
invalidSignLine=\u00a74Linia\u00a7c {0} \u00a74na znaku jest bledna.
|
||||
invalidWarpName=\u00a74Niepoprawna nazwa warpa.
|
||||
@ -520,3 +519,5 @@ youHaveNewMail=\u00a77Masz\u00a7c {0} \u00a77wiadomosci! Wpisz \u00a7c/mail read
|
||||
playerUnbanned=\u00a76Player\u00a7c {0} \u00a76unbanned {1}.
|
||||
playerUnbanIpAddress=\u00a76Player\u00a7c {0} \u00a76unbanned IP: {1}.
|
||||
playerBanIpAddress=\u00a77Gracz\u00a7c {0} \u00a77zostal zbanowany na adres IP {1}\u00a77.
|
||||
noPotionEffectPerm=\u00a74You do not have permission to apply potion effect \u00a7c{0} \u00a74to this potion
|
||||
invalidPotionEffect=\u00a74Invalid potion effect \u00a7c{0}
|
||||
|
@ -178,7 +178,6 @@ invalidHomeName=\u00a74Invalid home name
|
||||
invalidMob=Tipo de mob inv\u00e1lido.
|
||||
invalidNumber=Invalid Number
|
||||
invalidPotion=\u00a74Invalid Potion
|
||||
invalidPotionEffect=\u00a74You do not have permissions to apply potion effect \u00a7c{0} \u00a74to this potion
|
||||
invalidServer=Servidor inv\u00e1lido!
|
||||
invalidSignLine=Linha {0} da placa e inv\u00e1lida.
|
||||
invalidWarpName=\u00a74Invalid warp name
|
||||
@ -520,3 +519,5 @@ youHaveNewMail=\u00a7cVoc\u00ea tem {0} mensagens!\u00a7f Digite \u00a77/mail re
|
||||
playerUnbanned=\u00a76Player\u00a7c {0} \u00a76unbanned {1}.
|
||||
playerUnbanIpAddress=\u00a76Player\u00a7c {0} \u00a76unbanned IP: {1}.
|
||||
playerBanIpAddress=\u00a76Player\u00a7c {0} \u00a76banned IP address {1}\u00a76.
|
||||
noPotionEffectPerm=\u00a74You do not have permission to apply potion effect \u00a7c{0} \u00a74to this potion
|
||||
invalidPotionEffect=\u00a74Invalid potion effect \u00a7c{0}
|
||||
|
@ -178,7 +178,6 @@ invalidHomeName=\u00a74Ogiltigt hemnamn
|
||||
invalidMob=Ogiltig monstertyp.
|
||||
invalidNumber=Felaktigt nummer
|
||||
invalidPotion=\u00a74Invalid Potion
|
||||
invalidPotionEffect=\u00a74You do not have permissions to apply potion effect \u00a7c{0} \u00a74to this potion
|
||||
invalidServer=Ogiltig server!
|
||||
invalidSignLine=Rad {0} p\u00e5 skylten \u00e4r ogiltig.
|
||||
invalidWarpName=\u00a74Ogiltigt warpnamn
|
||||
@ -520,3 +519,5 @@ youHaveNewMail=\u00a7cDu har {0} meddelanden!\u00a7f Skriv \u00a77/mail read\u00
|
||||
playerUnbanned=\u00a76Player\u00a7c {0} \u00a76unbanned {1}.
|
||||
playerUnbanIpAddress=\u00a76Player\u00a7c {0} \u00a76unbanned IP: {1}.
|
||||
playerBanIpAddress=\u00a76Player\u00a7c {0} \u00a76banned IP address {1}\u00a76.
|
||||
noPotionEffectPerm=\u00a74You do not have permission to apply potion effect \u00a7c{0} \u00a74to this potion
|
||||
invalidPotionEffect=\u00a74Invalid potion effect \u00a7c{0}
|
||||
|
Loading…
Reference in New Issue
Block a user