I am creating a spigot plugin and using an API called GlowAPI. The command I am trying to run is GlowAPI.setGlowing(Player player, GlowAPI.Color color, Collection<? extends Player> receivers).
The command is able to be called, but crashes when trying to get the GlowAPI.Color (which is a public static enum in the same package as the GlowAPI class), because "NoClassDefError". Below are snippets of my calls, my pom.xml, GlowAPI's enum and my error.
My Error:
[21:54:48] [Server thread/WARN]: [MinecraftManhunt] Task #5 for MinecraftManhunt v1.3.3.9 generated an exception java.lang.NoClassDefFoundError: Could not initialize class org.inventivetalent.glow.GlowAPI$Color at com.yoonicode.minecraftmanhuntplus.TaskManager.showGlow(TaskManager.java:92) ~[?:?] at com.yoonicode.minecraftmanhuntplus.PluginCommands$5.run(PluginCommands.java:178) ~[?:?] at org.bukkit.craftbukkit.v1_18_R1.scheduler.CraftTask.run(CraftTask.java:82) ~[spigot-1.18-R0.1-SNAPSHOT.jar:3342-Spigot-3c40a6c-03b7252] at org.bukkit.craftbukkit.v1_18_R1.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:415) ~[spigot-1.18-R0.1-SNAPSHOT.jar:3342-Spigot-3c40a6c-03b7252] at net.minecraft.server.MinecraftServer.b(MinecraftServer.java:1255) ~[spigot-1.18-R0.1-SNAPSHOT.jar:3342-Spigot-3c40a6c-03b7252] at net.minecraft.server.dedicated.DedicatedServer.b(DedicatedServer.java:428) ~[spigot-1.18-R0.1-SNAPSHOT.jar:3342-Spigot-3c40a6c-03b7252] at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:1206) ~[spigot-1.18-R0.1-SNAPSHOT.jar:3342-Spigot-3c40a6c-03b7252] at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:1034) ~[spigot-1.18-R0.1-SNAPSHOT.jar:3342-Spigot-3c40a6c-03b7252] at net.minecraft.server.MinecraftServer.lambda$0(MinecraftServer.java:304) ~[spigot-1.18-R0.1-SNAPSHOT.jar:3342-Spigot-3c40a6c-03b7252] at java.lang.Thread.run(Thread.java:833) [?:?]
My Call:
for (Player player : main.runners)
GlowAPI.setGlowing(player, Color.GREEN, main.runners);
for (Player player : main.hunters)
GlowAPI.setGlowing(player, Color.GREEN, main.hunters);
I don't understand why this is not working. The GlowAPI.setGlowing() is being called, but it can't seem to use the Color enum.
My pom.xml:
<repository>
<id>inventive-repo</id>
<url>https://repo.inventivetalent.org/content/groups/public</url>
</repository>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
Their enum:
public static enum Color {
BLACK(0, "0"),
DARK_BLUE(1, "1"),
DARK_GREEN(2, "2"),
DARK_AQUA(3, "3"),
DARK_RED(4, "4"),
DARK_PURPLE(5, "5"),
GOLD(6, "6"),
GRAY(7, "7"),
DARK_GRAY(8, "8"),
BLUE(9, "9"),
GREEN(10, "a"),
AQUA(11, "b"),
RED(12, "c"),
PURPLE(13, "d"),
YELLOW(14, "e"),
WHITE(15, "f"),
NONE(-1, "");
I've never come across this error and I don't know what I'm doing wrong or why this is being thrown. How can I fix this?