Fixed /mi list

This commit is contained in:
Indyuce 2022-12-21 00:19:37 +01:00
parent e97036ab7b
commit 76877b0eb6
2 changed files with 15 additions and 16 deletions

View File

@ -1,22 +1,21 @@
package net.Indyuce.mmoitems.command.mmoitems.list;
import io.lumine.mythic.lib.command.api.CommandTreeNode;
import net.Indyuce.mmoitems.stat.LuteAttackEffectStat.LuteAttackEffect;
import org.bukkit.ChatColor;
import org.bukkit.command.CommandSender;
import net.Indyuce.mmoitems.stat.LuteAttackEffectStat.LuteAttackEffect;
import io.lumine.mythic.lib.command.api.CommandTreeNode;
public class LuteAttackCommandTreeNode extends CommandTreeNode {
public LuteAttackCommandTreeNode(CommandTreeNode parent) {
super(parent, "lute");
}
public LuteAttackCommandTreeNode(CommandTreeNode parent) {
super(parent, "lute");
}
@Override
public CommandResult execute(CommandSender sender, String[] args) {
sender.sendMessage(ChatColor.DARK_GRAY + "" + ChatColor.STRIKETHROUGH + "-----------------[" + ChatColor.LIGHT_PURPLE
+ " Lute Attack Effects " + ChatColor.DARK_GRAY + "" + ChatColor.STRIKETHROUGH + "]-----------------");
for (LuteAttackEffect lae : LuteAttackEffect.values())
sender.sendMessage("* " + ChatColor.LIGHT_PURPLE + lae.getName());
return CommandResult.SUCCESS;
}
@Override
public CommandResult execute(CommandSender sender, String[] args) {
sender.sendMessage(ChatColor.DARK_GRAY + "" + ChatColor.STRIKETHROUGH + "-----------------[" + ChatColor.LIGHT_PURPLE
+ " Lute Attack Effects " + ChatColor.DARK_GRAY + "" + ChatColor.STRIKETHROUGH + "]-----------------");
for (LuteAttackEffect lae : LuteAttackEffect.values())
sender.sendMessage("* " + ChatColor.LIGHT_PURPLE + lae.name());
return CommandResult.SUCCESS;
}
}

View File

@ -16,8 +16,8 @@ public class StaffSpiritCommandTreeNode extends CommandTreeNode {
sender.sendMessage(ChatColor.DARK_GRAY + "" + ChatColor.STRIKETHROUGH + "-----------------[" + ChatColor.LIGHT_PURPLE + " Staff Spirits "
+ ChatColor.DARK_GRAY + "" + ChatColor.STRIKETHROUGH + "]-----------------");
for (StaffSpirit ss : StaffSpirit.values()) {
String lore = !ss.hasLore() ? " " + ChatColor.WHITE + ">> " + ChatColor.GRAY + "" + ChatColor.ITALIC + ss.getLore() : "";
sender.sendMessage("* " + ChatColor.LIGHT_PURPLE + ss.getName() + lore);
String lore = ss.hasLore() ? " " + ChatColor.WHITE + ">> " + ChatColor.GRAY + "" + ChatColor.ITALIC + ss.getDefaultLore() : "";
sender.sendMessage("* " + ChatColor.LIGHT_PURPLE + ss.name() + lore);
}
return CommandResult.SUCCESS;
}