Improvements to the Lute Attack Effect like typos and updated to match staff spirit correctly, Also changed the GUI icon to diamond armor horse and added the /mi list lute command to the lore just like staff spirit

This commit is contained in:
HexedHero 2019-09-25 13:42:09 -04:00
parent c27ee02ac6
commit e54de666e6

View File

@ -26,7 +26,7 @@ import net.Indyuce.mmoitems.version.nms.ItemTag;
public class Lute_Attack_Effect extends StringStat {
public Lute_Attack_Effect() {
super(new ItemStack(VersionMaterial.GOLDEN_HORSE_ARMOR.toMaterial()), "Lute Attack Effect", new String[] { "Changes how your lute behaves", "when right clicked." }, "lute-attack-effect", new String[] { "lute" });
super(new ItemStack(VersionMaterial.DIAMOND_HORSE_ARMOR.toMaterial()), "Lute Attack Effect", new String[] { "Changes how your lute behaves", "when right clicked.", "&9Tip: /mi list lute" }, "lute-attack-effect", new String[] { "lute" });
}
@Override
@ -36,15 +36,11 @@ public class Lute_Attack_Effect extends StringStat {
config.getConfig().set(inv.getItemId() + ".lute-attack-effect", null);
inv.registerItemEdition(config);
inv.open();
inv.getPlayer().sendMessage(MMOItems.plugin.getPrefix() + "Successfully removed Lute Attack Effect.");
inv.getPlayer().sendMessage(MMOItems.plugin.getPrefix() + "Successfully removed lute attack effect.");
return true;
}
new StatEdition(inv, this).enable("Write in the chat the text you want.");
inv.getPlayer().sendMessage("");
inv.getPlayer().sendMessage(ChatColor.GREEN + "" + ChatColor.BOLD + "Available Lute Attacks");
for (LuteAttackEffect effect : LuteAttackEffect.values())
inv.getPlayer().sendMessage("* " + ChatColor.GREEN + effect.name());
return true;
}
@ -56,13 +52,14 @@ public class Lute_Attack_Effect extends StringStat {
effect = LuteAttackEffect.valueOf(format);
} catch (Exception e1) {
inv.getPlayer().sendMessage(MMOItems.plugin.getPrefix() + ChatColor.RED + format + " is not a valid lute attack effect.");
inv.getPlayer().sendMessage(MMOItems.plugin.getPrefix() + ChatColor.RED + "See all lute effects here: /mi list lute.");
return false;
}
config.getConfig().set(inv.getItemId() + ".lute-attack-effect", effect.name());
inv.registerItemEdition(config);
inv.open();
inv.getPlayer().sendMessage(MMOItems.plugin.getPrefix() + "Staff Spirit successfully changed to " + effect.getDefaultName() + ".");
inv.getPlayer().sendMessage(MMOItems.plugin.getPrefix() + "Lute attack effect successfully changed to " + effect.getDefaultName() + ".");
return true;
}
@ -112,3 +109,4 @@ public class Lute_Attack_Effect extends StringStat {
}
}
}