mirror of
https://gitlab.com/phoenix-dvpmt/mmoitems.git
synced 2025-02-07 12:11:22 +01:00
added custom error message when translation not found
added message to mmocore attribute condition
This commit is contained in:
parent
5731b80c52
commit
378af5245d
@ -26,7 +26,7 @@ public class Required_Attribute extends DoubleStat implements Conditional {
|
||||
MMOCoreRPGPlayer mmocore = (MMOCoreRPGPlayer) player;
|
||||
if (mmocore.getData().getAttributes().getAttribute(attribute) < item.getStat(this)) {
|
||||
if (message) {
|
||||
new AddonMessage("not-enough-attribute").format(ChatColor.RED).send(player.getPlayer(), "cant-use-item");
|
||||
new AddonMessage("not-enough-attribute").format(ChatColor.RED, "#attribute#", attribute.getName()).send(player.getPlayer(), "cant-use-item");
|
||||
player.getPlayer().playSound(player.getPlayer().getLocation(), Sound.ENTITY_VILLAGER_NO, 1, 1.5f);
|
||||
}
|
||||
return false;
|
||||
|
@ -213,7 +213,8 @@ public class ConfigManager {
|
||||
}
|
||||
|
||||
public String getMessage(String path) {
|
||||
return ChatColor.translateAlternateColorCodes('&', messages.getConfig().getString(path));
|
||||
String found = messages.getConfig().getString(path);
|
||||
return ChatColor.translateAlternateColorCodes('&', found == null ? "<MessageNotFound:" + path + ">" : found);
|
||||
}
|
||||
|
||||
public String getAbilityName(Ability ability) {
|
||||
|
Loading…
Reference in New Issue
Block a user