From 8f82afeb0b1f953ccee92b564318421f1f945aa5 Mon Sep 17 00:00:00 2001 From: Pyrbu Date: Tue, 13 Jun 2023 23:55:34 +0200 Subject: [PATCH] make action list not bold --- .../interaction/consolecommand/ConsoleCommandAction.java | 9 ++++----- .../pyr/znpcsplus/interaction/message/MessageAction.java | 5 ++--- .../interaction/playercommand/PlayerCommandAction.java | 5 ++--- .../interaction/switchserver/SwitchServerAction.java | 5 ++--- 4 files changed, 10 insertions(+), 14 deletions(-) diff --git a/plugin/src/main/java/lol/pyr/znpcsplus/interaction/consolecommand/ConsoleCommandAction.java b/plugin/src/main/java/lol/pyr/znpcsplus/interaction/consolecommand/ConsoleCommandAction.java index 7f789de..ed06e6d 100644 --- a/plugin/src/main/java/lol/pyr/znpcsplus/interaction/consolecommand/ConsoleCommandAction.java +++ b/plugin/src/main/java/lol/pyr/znpcsplus/interaction/consolecommand/ConsoleCommandAction.java @@ -9,7 +9,6 @@ import net.kyori.adventure.text.Component; import net.kyori.adventure.text.event.ClickEvent; import net.kyori.adventure.text.event.HoverEvent; import net.kyori.adventure.text.format.NamedTextColor; -import net.kyori.adventure.text.format.TextDecoration; import org.bukkit.Bukkit; import org.bukkit.entity.Player; @@ -32,18 +31,18 @@ public class ConsoleCommandAction extends InteractionAction { @Override public Component getInfo(String id, int index, CommandContext context) { return Component.text(index + ") ", NamedTextColor.GOLD) - .append(Component.text("[EDIT]", NamedTextColor.DARK_GREEN, TextDecoration.BOLD) + .append(Component.text("[EDIT]", NamedTextColor.DARK_GREEN) .hoverEvent(HoverEvent.hoverEvent(HoverEvent.Action.SHOW_TEXT, Component.text("Click to edit this action", NamedTextColor.GRAY))) .clickEvent(ClickEvent.clickEvent(ClickEvent.Action.SUGGEST_COMMAND, "/" + context.getLabel() + " action edit " + id + " " + index + " consolecommand " + " " + getInteractionType().name() + " " + getCooldown()/1000 + " " + command)) - .append(Component.text(" | ", NamedTextColor.GRAY).decoration(TextDecoration.BOLD, false)) - .append(Component.text("[DELETE]", NamedTextColor.RED, TextDecoration.BOLD) + .append(Component.text(" | ", NamedTextColor.GRAY)) + .append(Component.text("[DELETE]", NamedTextColor.RED) .hoverEvent(HoverEvent.hoverEvent(HoverEvent.Action.SHOW_TEXT, Component.text("Click to delete this action", NamedTextColor.GRAY))) .clickEvent(ClickEvent.clickEvent(ClickEvent.Action.SUGGEST_COMMAND, "/" + context.getLabel() + " action delete " + id + " " + index))) - .append(Component.text(" | ", NamedTextColor.GRAY).style(style -> style.decoration(TextDecoration.BOLD, false))) + .append(Component.text(" | ", NamedTextColor.GRAY)) .append(Component.text("Console Command: ", NamedTextColor.GREEN) .hoverEvent(HoverEvent.hoverEvent(HoverEvent.Action.SHOW_TEXT, Component.text("Click Type: " + getInteractionType().name() + " Cooldown: " + getCooldown()/1000, NamedTextColor.GREEN)))) diff --git a/plugin/src/main/java/lol/pyr/znpcsplus/interaction/message/MessageAction.java b/plugin/src/main/java/lol/pyr/znpcsplus/interaction/message/MessageAction.java index 2692e87..962b31b 100644 --- a/plugin/src/main/java/lol/pyr/znpcsplus/interaction/message/MessageAction.java +++ b/plugin/src/main/java/lol/pyr/znpcsplus/interaction/message/MessageAction.java @@ -9,7 +9,6 @@ import net.kyori.adventure.text.Component; import net.kyori.adventure.text.event.ClickEvent; import net.kyori.adventure.text.event.HoverEvent; import net.kyori.adventure.text.format.NamedTextColor; -import net.kyori.adventure.text.format.TextDecoration; import net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer; import org.bukkit.entity.Player; @@ -35,13 +34,13 @@ public class MessageAction extends InteractionAction { @Override public Component getInfo(String id, int index, CommandContext context) { return Component.text(index + ") ", NamedTextColor.GOLD) - .append(Component.text("[EDIT]", NamedTextColor.DARK_GREEN, TextDecoration.BOLD) + .append(Component.text("[EDIT]", NamedTextColor.DARK_GREEN) .hoverEvent(HoverEvent.hoverEvent(HoverEvent.Action.SHOW_TEXT, Component.text("Click to edit this action", NamedTextColor.GRAY))) .clickEvent(ClickEvent.clickEvent(ClickEvent.Action.SUGGEST_COMMAND, "/" + context.getLabel() + " action edit " + id + " " + index + " message " + getInteractionType().name() + " " + getCooldown()/1000 + " " + message)) .append(Component.text(" | ", NamedTextColor.GRAY)) - .append(Component.text("[DELETE]", NamedTextColor.RED, TextDecoration.BOLD) + .append(Component.text("[DELETE]", NamedTextColor.RED) .hoverEvent(HoverEvent.hoverEvent(HoverEvent.Action.SHOW_TEXT, Component.text("Click to delete this action", NamedTextColor.GRAY))) .clickEvent(ClickEvent.clickEvent(ClickEvent.Action.SUGGEST_COMMAND, diff --git a/plugin/src/main/java/lol/pyr/znpcsplus/interaction/playercommand/PlayerCommandAction.java b/plugin/src/main/java/lol/pyr/znpcsplus/interaction/playercommand/PlayerCommandAction.java index 4e505b6..1fb5189 100644 --- a/plugin/src/main/java/lol/pyr/znpcsplus/interaction/playercommand/PlayerCommandAction.java +++ b/plugin/src/main/java/lol/pyr/znpcsplus/interaction/playercommand/PlayerCommandAction.java @@ -9,7 +9,6 @@ import net.kyori.adventure.text.Component; import net.kyori.adventure.text.event.ClickEvent; import net.kyori.adventure.text.event.HoverEvent; import net.kyori.adventure.text.format.NamedTextColor; -import net.kyori.adventure.text.format.TextDecoration; import org.bukkit.entity.Player; public class PlayerCommandAction extends InteractionAction { @@ -31,13 +30,13 @@ public class PlayerCommandAction extends InteractionAction { @Override public Component getInfo(String id, int index, CommandContext context) { return Component.text(index + ") ", NamedTextColor.GOLD) - .append(Component.text("[EDIT]", NamedTextColor.DARK_GREEN, TextDecoration.BOLD) + .append(Component.text("[EDIT]", NamedTextColor.DARK_GREEN) .hoverEvent(HoverEvent.hoverEvent(HoverEvent.Action.SHOW_TEXT, Component.text("Click to edit this action", NamedTextColor.GRAY))) .clickEvent(ClickEvent.clickEvent(ClickEvent.Action.SUGGEST_COMMAND, "/" + context.getLabel() + " action edit " + id + " " + index + " playercommand " + " " + getInteractionType().name() + " " + getCooldown()/1000 + " " + command)) .append(Component.text(" | ", NamedTextColor.GRAY)) - .append(Component.text("[DELETE]", NamedTextColor.RED, TextDecoration.BOLD) + .append(Component.text("[DELETE]", NamedTextColor.RED) .hoverEvent(HoverEvent.hoverEvent(HoverEvent.Action.SHOW_TEXT, Component.text("Click to delete this action", NamedTextColor.GRAY))) .clickEvent(ClickEvent.clickEvent(ClickEvent.Action.SUGGEST_COMMAND, diff --git a/plugin/src/main/java/lol/pyr/znpcsplus/interaction/switchserver/SwitchServerAction.java b/plugin/src/main/java/lol/pyr/znpcsplus/interaction/switchserver/SwitchServerAction.java index 5effa2e..594ff97 100644 --- a/plugin/src/main/java/lol/pyr/znpcsplus/interaction/switchserver/SwitchServerAction.java +++ b/plugin/src/main/java/lol/pyr/znpcsplus/interaction/switchserver/SwitchServerAction.java @@ -8,7 +8,6 @@ import net.kyori.adventure.text.Component; import net.kyori.adventure.text.event.ClickEvent; import net.kyori.adventure.text.event.HoverEvent; import net.kyori.adventure.text.format.NamedTextColor; -import net.kyori.adventure.text.format.TextDecoration; import org.bukkit.entity.Player; public class SwitchServerAction extends InteractionAction { @@ -29,13 +28,13 @@ public class SwitchServerAction extends InteractionAction { @Override public Component getInfo(String id, int index, CommandContext context) { return Component.text(index + ") ", NamedTextColor.GOLD) - .append(Component.text("[EDIT]", NamedTextColor.DARK_GREEN, TextDecoration.BOLD) + .append(Component.text("[EDIT]", NamedTextColor.DARK_GREEN) .hoverEvent(HoverEvent.hoverEvent(HoverEvent.Action.SHOW_TEXT, Component.text("Click to edit this action", NamedTextColor.GRAY))) .clickEvent(ClickEvent.clickEvent(ClickEvent.Action.SUGGEST_COMMAND, "/" + context.getLabel() + " action edit " + id + " " + index + " switcserver " + " " + getInteractionType().name() + " " + getCooldown()/1000 + " " + server)) .append(Component.text(" | ", NamedTextColor.GRAY)) - .append(Component.text("[DELETE]", NamedTextColor.RED, TextDecoration.BOLD) + .append(Component.text("[DELETE]", NamedTextColor.RED) .hoverEvent(HoverEvent.hoverEvent(HoverEvent.Action.SHOW_TEXT, Component.text("Click to delete this action", NamedTextColor.GRAY))) .clickEvent(ClickEvent.clickEvent(ClickEvent.Action.SUGGEST_COMMAND,