Fix message with overlapping effect/style name

This commit is contained in:
Esophose 2020-05-20 13:35:47 -06:00
parent 2521f01d9a
commit 135bdb1065
7 changed files with 15 additions and 2 deletions

View file

@ -71,6 +71,7 @@ public class RemoveCommandModule implements CommandModule {
removed = true;
} else if (style == null) {
localeManager.sendMessage(pplayer, "remove-effect-none", StringPlaceholders.single("effect", effect.getName()));
return;
}
}
@ -89,11 +90,17 @@ public class RemoveCommandModule implements CommandModule {
removed = true;
} else if (effect == null) {
localeManager.sendMessage(pplayer, "remove-style-none", StringPlaceholders.single("style", style.getName()));
return;
}
}
if (!removed)
localeManager.sendMessage(pplayer, "remove-unknown", StringPlaceholders.single("name", args[0]));
if (!removed) {
if (effect != null && style != null) {
localeManager.sendMessage(pplayer, "remove-effect-style-none", StringPlaceholders.single("name", style.getName()));
} else {
localeManager.sendMessage(pplayer, "remove-unknown", StringPlaceholders.single("name", args[0]));
}
}
}
}

View file

@ -118,6 +118,7 @@ public class EnglishLocale implements Locale {
this.put("remove-effect-none", "&cYou do not have any particles applied with the effect &b%effect%&c!");
this.put("remove-style-success", "&aRemoved &b%amount% &aof your particles with the style of &b%style%&a!");
this.put("remove-style-none", "&cYou do not have any particles applied with the style &b%style%&c!");
this.put("remove-effect-style-none", "&cYou do not have any particles applied with the effect or style &b%name%&c!");
this.put("remove-unknown", "&cAn effect or style with the name of &b%name% &cdoes not exist!");
this.put("#10", "List Messages");

View file

@ -118,6 +118,7 @@ public class FrenchLocale implements Locale {
this.put("remove-effect-none", "&cVous n'avez pas de particules appliquées avec l'effet &b%effect% &c!");
this.put("remove-style-success", "&aSuppression &b%amount% &ade votre particule avec le style &b%style% &a!");
this.put("remove-style-none", "&cVous n'avez pas de particules appliquées avec le style &b%style% &c!");
this.put("remove-effect-style-none", "&cVous n'avez pas de particules appliquées avec l'effet ou le style &b%name% &c!");
this.put("remove-unknown", "&cL'effect avec le nom ou le style &b%name% &cn'existe pas !");
this.put("#10", "List Messages");

View file

@ -118,6 +118,7 @@ public class GermanLocale implements Locale {
this.put("remove-effect-none", "&cSie haben keine Partikel mit dem Effekt &b%effect%&cangelegt!");
this.put("remove-style-success", "&b%amount% &adeiner Partikel im Stil von &b%style% &aentfernt!");
this.put("remove-style-none", "&cSie haben keine Partikel mit dem Stil &b%style%&cangelegt!");
this.put("remove-effect-style-none", "&cSie haben keine Partikel mit der Wirkung oder dem Stil &b%name% &cangewendet!");
this.put("remove-unknown", "&cEs existiert kein Effekt oder Stil mit dem Namen &b%name%&c!");
this.put("#10", "List Messages");

View file

@ -118,6 +118,7 @@ public class RussianLocale implements Locale {
this.put("remove-effect-none", "&cУ Вас нет каких-либо частиц с эффектом &b%effect%&c!");
this.put("remove-style-success", "&aКоличество удалённых частиц - &b%amount% &a, стилей - &b%style%&a!");
this.put("remove-style-none", "&cУ Вас нет каких-либо частиц со стилем &b%style%&c!");
this.put("remove-effect-style-none", "&cУ вас нет никаких частиц с эффектом или стилем &b%name%&c!");
this.put("remove-unknown", "&cЭффект или стиль под названием &b%name% &cне существует!");
this.put("#10", "List Messages");

View file

@ -118,6 +118,7 @@ public class SimplifiedChineseLocale implements Locale {
this.put("remove-effect-none", "&c你没有使用特效&b%effect%&c的粒子!");
this.put("remove-style-success", "&已成功删除&b%amount%&a个使用了风格&b%style%&a的粒子!");
this.put("remove-style-none", "&c你没有已使用风格&b%style%&c的粒子!");
this.put("remove-effect-style-none", "&c您没有应用任何颗粒效果或样式&b%name%&c!");
this.put("remove-unknown", "&c名为&b%name%&c的特效或风格不存在!");
this.put("#10", "List Messages");

View file

@ -118,6 +118,7 @@ public class VietnameseLocale implements Locale {
this.put("remove-effect-none", "&cBạn không có bất kì Hạt hiệu ứng nào để áp dụng hiệu ứng &b%effect%&c!");
this.put("remove-style-success", "&aĐã xóa &b%amount% &aHạt hiệu ứng của bạn với style &b%style%&a!");
this.put("remove-style-none", "&cBạn không có bất kì Hạt hiệu ứng nào để áp dụng style &b%style%&c!");
this.put("remove-effect-style-none", "&cBạn không có bất kỳ hạt nào được áp dụng với hiệu ứng hoặc kiểu %name%&c!");
this.put("remove-unknown", "&cEffect hoặc Style với tên &b%name% &ckhông tồn tại!");
this.put("#10", "List Messages");