kernitus / BukkitOldCombatMechanics

Spigot plugin to configure combat mechanics from 1.9 onwards
https://www.spigotmc.org/resources/19510/
Mozilla Public License 2.0
161 stars 69 forks source link

Missing Vector#rotate methods < 1.14 #606

Closed fedde2001 closed 2 years ago

fedde2001 commented 2 years ago

Hi there, this error is spamming pretty much always in my console output:

[20:49:38 ERROR]: Could not pass event ProjectileLaunchEvent to OldCombatMechanics v1.9.0
java.lang.NoSuchMethodError: 'org.bukkit.util.Vector org.bukkit.util.Vector.rotateAroundY(double)'
at kernitus.plugin.OldCombatMechanics.module.ModuleDisableProjectileRandomness.onProjectileLaunch(ModuleDisableProjectileRandomness.java:48) ~[?:?]
at com.destroystokyo.paper.event.executor.asm.generated.GeneratedEventExecutor54.execute(Unknown Source) ~[?:?]
at org.bukkit.plugin.EventExecutor$2.execute(EventExecutor.java:70) ~[patched_1.12.2.jar:git-Paper-1620]
at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:78) ~[patched_1.12.2.jar:git-Paper-1620]
at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62) ~[patched_1.12.2.jar:git-Paper-1620]
at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:513) ~[patched_1.12.2.jar:git-Paper-1620]
at org.bukkit.craftbukkit.v1_12_R1.event.CraftEventFactory.callProjectileLaunchEvent(CraftEventFactory.java:867) ~[patched_1.12.2.jar:git-Paper-1620]
at net.minecraft.server.v1_12_R1.World.addEntity(World.java:1141) ~[patched_1.12.2.jar:git-Paper-1620]
at net.minecraft.server.v1_12_R1.WorldServer.addEntity(WorldServer.java:1145) ~[patched_1.12.2.jar:git-Paper-1620]
at net.minecraft.server.v1_12_R1.World.addEntity(World.java:1115) ~[patched_1.12.2.jar:git-Paper-1620]
at net.minecraft.server.v1_12_R1.ItemExpBottle.a(SourceFile:33) ~[patched_1.12.2.jar:git-Paper-1620]
at net.minecraft.server.v1_12_R1.ItemStack.a(ItemStack.java:330) ~[patched_1.12.2.jar:git-Paper-1620]
at net.minecraft.server.v1_12_R1.PlayerInteractManager.a(PlayerInteractManager.java:431) ~[patched_1.12.2.jar:git-Paper-1620]
at net.minecraft.server.v1_12_R1.PlayerConnection.a(PlayerConnection.java:1064) ~[patched_1.12.2.jar:git-Paper-1620]
at net.minecraft.server.v1_12_R1.PacketPlayInBlockPlace.a(PacketPlayInBlockPlace.java:26) ~[patched_1.12.2.jar:git-Paper-1620]
at net.minecraft.server.v1_12_R1.PacketPlayInBlockPlace.a(PacketPlayInBlockPlace.java:5) ~[patched_1.12.2.jar:git-Paper-1620]
at net.minecraft.server.v1_12_R1.PlayerConnectionUtils.lambda$ensureMainThread$0(PlayerConnectionUtils.java:14) ~[patched_1.12.2.jar:git-Paper-1620]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) ~[?:?]
at java.util.concurrent.FutureTask.run(FutureTask.java:264) ~[?:?]
at net.minecraft.server.v1_12_R1.SystemUtils.a(SourceFile:46) ~[patched_1.12.2.jar:git-Paper-1620]
at net.minecraft.server.v1_12_R1.MinecraftServer.D(MinecraftServer.java:850) ~[patched_1.12.2.jar:git-Paper-1620]
at net.minecraft.server.v1_12_R1.DedicatedServer.D(DedicatedServer.java:423) ~[patched_1.12.2.jar:git-Paper-1620]
at net.minecraft.server.v1_12_R1.MinecraftServer.C(MinecraftServer.java:774) ~[patched_1.12.2.jar:git-Paper-1620]
at net.minecraft.server.v1_12_R1.MinecraftServer.run(MinecraftServer.java:666) ~[patched_1.12.2.jar:git-Paper-1620]
at java.lang.Thread.run(Thread.java:834) [?:?]

Anything I can do to fix this?

kernitus commented 2 years ago

It seems that the rotate methods in the Vector class were only added with 1.14. In the meantime you can turn off the DisableProjectileRandomness module to stop the error from showing up.