IncompatibleClassChangeError
Martijnpold opened this issue · 2 comments
Describe the bug
I am having a strange issue where calls to the API sometimes result in an exception while sometimes it will work just fine. I am currently using the latest version of the API on a paper 1.16 server.
java.lang.IncompatibleClassChangeError: Found interface com.github.yannicklamprecht.worldborder.api.WorldBorderApi, but class was expected
at world.bentobox.border.Border.removeBorder(Border.java:68) ~[?:?]
at world.bentobox.border.Border.updateBorder(Border.java:57) ~[?:?]
at world.bentobox.border.listeners.PlayerListener.lambda$onPlayerTeleport$1(PlayerListener.java:56) ~[?:?]
at org.bukkit.craftbukkit.v1_16_R1.scheduler.CraftTask.run(CraftTask.java:99) ~[patched_1.16.1.jar:git-Paper-21]
at org.bukkit.craftbukkit.v1_16_R1.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:468) ~[patched_1.16.1.jar:git-Paper-21]
at net.minecraft.server.v1_16_R1.MinecraftServer.b(MinecraftServer.java:1291) ~[patched_1.16.1.jar:git-Paper-21]
at net.minecraft.server.v1_16_R1.DedicatedServer.b(DedicatedServer.java:377) ~[patched_1.16.1.jar:git-Paper-21]
at net.minecraft.server.v1_16_R1.MinecraftServer.a(MinecraftServer.java:1212) ~[patched_1.16.1.jar:git-Paper-21]
at net.minecraft.server.v1_16_R1.MinecraftServer.v(MinecraftServer.java:1000) ~[patched_1.16.1.jar:git-Paper-21]
at net.minecraft.server.v1_16_R1.MinecraftServer.lambda$a$0(MinecraftServer.java:177) ~[patched_1.16.1.jar:git-Paper-21]
at java.lang.Thread.run(Unknown Source) [?:1.8.0_161]
The exact call is as followed: BorderAPI.getApi().setBorder(player, tier.getIslandSize() + 1, island.getCenter());
This is being called from various different events like a player teleport event and others.
Like I said, what's weird is that the border sometimes does actually update, but other times it doesn't.
Expected behavior
The border should update without any errors.
Additional context
Attempted with both the jar as a maven dependency and also with jitpack and the repo as a dependency.
Seems like something else was messing around with it that might have been accessing it using some outdated method, will investigate it a bit more, if it's an issue I'll propose a PR :)
You're mixing things up. world.bentobox.border.Border
has nothing to do with WorldBorderAPI. The Bentobox border is the world pregeneration plugin. I guess you are using both and mixed up the imports.