From c617766516f291e7ff0ca4edaa4d0e363b5bb6a0 Mon Sep 17 00:00:00 2001 From: Pyrbu Date: Wed, 28 Jun 2023 02:52:55 +0200 Subject: [PATCH] add hex colors to debug npcs --- plugin/src/main/java/lol/pyr/znpcsplus/ZNpcsPlus.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/plugin/src/main/java/lol/pyr/znpcsplus/ZNpcsPlus.java b/plugin/src/main/java/lol/pyr/znpcsplus/ZNpcsPlus.java index 1aafd95..cb60cec 100644 --- a/plugin/src/main/java/lol/pyr/znpcsplus/ZNpcsPlus.java +++ b/plugin/src/main/java/lol/pyr/znpcsplus/ZNpcsPlus.java @@ -50,6 +50,7 @@ import lol.pyr.znpcsplus.util.*; import net.kyori.adventure.platform.bukkit.BukkitAudiences; import net.kyori.adventure.text.Component; import net.kyori.adventure.text.format.NamedTextColor; +import net.kyori.adventure.text.format.TextColor; import net.kyori.adventure.text.minimessage.MiniMessage; import net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer; import org.bstats.bukkit.Metrics; @@ -199,7 +200,9 @@ public class ZNpcsPlus extends JavaPlugin { NpcEntryImpl entry = npcRegistry.create("debug_npc_" + i, world, type, new NpcLocation(i * 3, 200, 0, 0, 0)); entry.setProcessed(true); NpcImpl npc = entry.getNpc(); - npc.getHologram().addLineComponent(Component.text("Hello, World!")); + npc.getHologram().addLineComponent(Component.text("Hello, World!", TextColor.color(255, 0, 0))); + npc.getHologram().addLineComponent(Component.text("Hello, World!", TextColor.color(0, 255, 0))); + npc.getHologram().addLineComponent(Component.text("Hello, World!", TextColor.color(0, 0, 255))); npc.setProperty(propertyRegistry.getByName("look", Boolean.class), true); i++; }