kernitus / BukkitOldCombatMechanics

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

1.18 Collisions reflection error #591

Closed hoehoetvhss closed 2 years ago

hoehoetvhss commented 2 years ago
`[06:03:23 ERROR]: Could not pass event PlayerChangedWorldEvent to OldCombatMechanics v1.10.0
java.lang.NullPointerException: Cannot invoke "java.lang.reflect.Method.invoke(Object, Object[])" because "method" is null
        at kernitus.plugin.OldCombatMechanics.utilities.reflection.Reflector.invokeMethod(Reflector.java:101) ~[OldCombatMechanics.jar:?]
        at kernitus.plugin.OldCombatMechanics.utilities.packet.team.V17TeamPacket$ScoreboardTeamWither.build(V17TeamPacket.java:198) ~[OldCombatMechanics.jar:?]
        at kernitus.plugin.OldCombatMechanics.utilities.packet.team.V17TeamPacket$PacketAccess.lambda$setCollisionRule$4(V17TeamPacket.java:127) ~[OldCombatMechanics.jar:?]
        at kernitus.plugin.OldCombatMechanics.utilities.reflection.Reflector.getUnchecked(Reflector.java:220) ~[OldCombatMechanics.jar:?]
        at kernitus.plugin.OldCombatMechanics.utilities.packet.team.V17TeamPacket$PacketAccess.setCollisionRule(V17TeamPacket.java:112) ~[OldCombatMechanics.jar:?]
        at kernitus.plugin.OldCombatMechanics.utilities.packet.team.V17TeamPacket$PacketAccess.createTeamPacket(V17TeamPacket.java:150) ~[OldCombatMechanics.jar:?]
        at kernitus.plugin.OldCombatMechanics.utilities.packet.team.V17TeamPacket.create(V17TeamPacket.java:51) ~[OldCombatMechanics.jar:?]
        at kernitus.plugin.OldCombatMechanics.utilities.packet.team.TeamPacket.create(TeamPacket.java:55) ~[OldCombatMechanics.jar:?]
        at kernitus.plugin.OldCombatMechanics.utilities.teams.TeamUtils.craftTeamCreatePacket(TeamUtils.java:37) ~[OldCombatMechanics.jar:?]
        at kernitus.plugin.OldCombatMechanics.module.ModulePlayerCollisions.createAndSendNewTeam(ModulePlayerCollisions.java:104) ~[OldCombatMechanics.jar:?]
        at kernitus.plugin.OldCombatMechanics.module.ModulePlayerCollisions.createOrUpdateTeam(ModulePlayerCollisions.java:91) ~[OldCombatMechanics.jar:?]
        at kernitus.plugin.OldCombatMechanics.module.ModulePlayerCollisions.onPlayerChangeWorld(ModulePlayerCollisions.java:67) ~[OldCombatMechanics.jar:?]
        at com.destroystokyo.paper.event.executor.asm.generated.GeneratedEventExecutor55.execute(Unknown Source) ~[?:?]
        at org.bukkit.plugin.EventExecutor.lambda$create$1(EventExecutor.java:75) ~[paper-api-1.18.1-R0.1-SNAPSHOT.jar:?]
        at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:80) ~[paper-api-1.18.1-R0.1-SNAPSHOT.jar:git-Paper-175]
        at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70) ~[paper-api-1.18.1-R0.1-SNAPSHOT.jar:?]
        at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:628) ~[paper-api-1.18.1-R0.1-SNAPSHOT.jar:?]
        at net.minecraft.server.players.PlayerList.respawn(PlayerList.java:986) ~[paper-1.18.1.jar:git-Paper-175]
        at net.minecraft.server.players.PlayerList.respawn(PlayerList.java:819) ~[paper-1.18.1.jar:git-Paper-175]
        at org.bukkit.craftbukkit.v1_18_R1.entity.CraftPlayer.teleport(CraftPlayer.java:1050) ~[paper-1.18.1.jar:git-Paper-175]
        at org.bukkit.craftbukkit.v1_18_R1.entity.CraftEntity.lambda$teleportAsync$0(CraftEntity.java:540) ~[paper-1.18.1.jar:git-Paper-175]
        at net.minecraft.server.TickTask.run(TickTask.java:18) ~[paper-1.18.1.jar:git-Paper-175]
        at net.minecraft.util.thread.BlockableEventLoop.doRunTask(BlockableEventLoop.java:149) ~[?:?]
        at net.minecraft.util.thread.ReentrantBlockableEventLoop.doRunTask(ReentrantBlockableEventLoop.java:23) ~[?:?]
        at net.minecraft.server.MinecraftServer.doRunTask(MinecraftServer.java:1413) ~[paper-1.18.1.jar:git-Paper-175]
        at net.minecraft.server.MinecraftServer.c(MinecraftServer.java:189) ~[paper-1.18.1.jar:git-Paper-175]
        at net.minecraft.util.thread.BlockableEventLoop.pollTask(BlockableEventLoop.java:122) ~[?:?]
        at net.minecraft.server.MinecraftServer.pollTaskInternal(MinecraftServer.java:1391) ~[paper-1.18.1.jar:git-Paper-175]
        at net.minecraft.server.MinecraftServer.pollTask(MinecraftServer.java:1384) ~[paper-1.18.1.jar:git-Paper-175]
        at net.minecraft.util.thread.BlockableEventLoop.managedBlock(BlockableEventLoop.java:132) ~[?:?]
        at net.minecraft.server.MinecraftServer.waitUntilNextTick(MinecraftServer.java:1362) ~[paper-1.18.1.jar:git-Paper-175]
        at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1268) ~[paper-1.18.1.jar:git-Paper-175]
        at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:317) ~[paper-1.18.1.jar:git-Paper-175]
        at java.lang.Thread.run(Thread.java:833) ~[?:?]

Server Version: git-Paper-173 (MC: 1.18.1)

Server Plugins: LuckPerms, OpenInv, AntiFreeCam, HolographicDisplays, ProtocolLib, GoldenHeads, BambooCollisionFix, OldCombatMechanics, ImageOnMap, RealTimePlugin, floodgate, Vault, WorldEdit, TNTRun_reloaded, Essentials, EconomyShopGUI-Premium, Multiverse-Core, WorldGuard, Citizens, Shopkeepers, ChestCommands, Multiverse-Inventories, EssentialsChat, Geyser-Spigot, CommandNPC, Multiverse-NetherPortals, EssentialsSpawn, CoreProtect, BlockProt, Skript, BedWars, GeyserSkinManager, SBA, ExtraContexts, SimplePets, SmoothTimber

OCM Config File: config.zip

kernitus commented 2 years ago

If you turn off the disable-player-collisions module does this error still show up?

hoehoetvhss commented 2 years ago

I tried creating a new config file. Disabling disable-player-collisions doesn't show any errors.

kernitus commented 2 years ago

@I-Al-Istannen did the Packets interface change again??

hoehoetvhss commented 2 years ago

I tried it with the above mentioned plugin file and it works fine and works with 1.18.2 as well.

nivcoo commented 2 years ago

Hello, any news regards this ? Because with blank config i've this error

I-Al-Istannen commented 2 years ago

The error should only occur if you enable the collisions module. For a fix you'll need to wait until https://github.com/kernitus/BukkitOldCombatMechanics/pull/602 is merged (or changes suggested).

nivcoo commented 2 years ago

yes i've this error when the module is enabled but i've another error when the plugin isn't enabled

nivcoo commented 2 years ago

Without the module i've this error https://github.com/kernitus/BukkitOldCombatMechanics/issues/601 and when the module is enabled i've the issue here

nivcoo commented 2 years ago

Hello, any news ?