Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Citizens hook "NPE" #115

Open
byteful opened this issue Oct 12, 2021 · 1 comment
Open

Citizens hook "NPE" #115

byteful opened this issue Oct 12, 2021 · 1 comment

Comments

@byteful
Copy link

byteful commented Oct 12, 2021

I made a plugin using this library and I didn't use any of the NPC features, but during startup I get this error.

[03:00:20 INFO]: [NexEngine] [Hook] Citizens: Success!
[03:00:20 WARN]: java.lang.IllegalArgumentException: Trait name null already registered
[03:00:20 WARN]:        at Citizens.jar//net.citizensnpcs.npc.CitizensTraitFactory.registerTrait(CitizensTraitFactory.java:178)
[03:00:20 WARN]:        at FarmRegeneration-1.0.0.jar//me.byteful.plugin.farmregeneration.lib.lucko.helper.npc.CitizensNpcFactory.registerTrait(CitizensNpcFactory.java:209)
[03:00:20 WARN]:        at FarmRegeneration-1.0.0.jar//me.byteful.plugin.farmregeneration.lib.lucko.helper.npc.CitizensNpcFactory.init(CitizensNpcFactory.java:89)
[03:00:20 WARN]:        at FarmRegeneration-1.0.0.jar//me.byteful.plugin.farmregeneration.lib.lucko.helper.npc.CitizensNpcFactory.lambda$new$1(CitizensNpcFactory.java:81)
[03:00:20 WARN]:        at FarmRegeneration-1.0.0.jar//me.byteful.plugin.farmregeneration.lib.lucko.helper.utils.Delegates$ConsumerToBiConsumerSecond.accept(Delegates.java:150)
[03:00:20 WARN]:        at FarmRegeneration-1.0.0.jar//me.byteful.plugin.farmregeneration.lib.lucko.helper.event.functional.single.HelperEventListener.execute(HelperEventListener.java:136)
[03:00:20 WARN]:        at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:80)
[03:00:20 WARN]:        at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70)
[03:00:20 WARN]:        at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:624)
[03:00:20 WARN]:        at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:381)
[03:00:20 WARN]:        at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:500)
[03:00:20 WARN]:        at org.bukkit.craftbukkit.v1_17_R1.CraftServer.enablePlugin(CraftServer.java:535)
[03:00:20 WARN]:        at org.bukkit.craftbukkit.v1_17_R1.CraftServer.enablePlugins(CraftServer.java:449)
[03:00:20 WARN]:        at net.minecraft.server.MinecraftServer.loadWorld(MinecraftServer.java:727)
[03:00:20 WARN]:        at net.minecraft.server.dedicated.DedicatedServer.init(DedicatedServer.java:318)
[03:00:20 WARN]:        at net.minecraft.server.MinecraftServer.x(MinecraftServer.java:1216)
[03:00:20 WARN]:        at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:321)
[03:00:20 WARN]:        at java.base/java.lang.Thread.run(Thread.java:831)

Seems to happen with any server version compatible with helper so it seems to be a plugin-to-plugin incompatibility. It's most likely "NexEngine" modifying traits in Citizens and then helper attempts to do the same.

@PepejHa4ker
Copy link

PepejHa4ker commented Oct 12, 2021

The helper registers the constant name of the trait. The problem is definitely not in it.
https://github.com/lucko/helper/blob/master/helper/src/main/java/me/lucko/helper/npc/CitizensNpcFactory.java#L222

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants