LuckPerms

LuckPerms

41.4k Downloads

Error with MassiveCombat

hafarooki opened this issue ยท 18 comments

commented

Ever since installing LP I've been getting this console spam:

[18:28:48 ERROR]: Could not pass event EventMassiveCorePlayerLeave to MassiveCombat v2.13.1
org.bukkit.event.EventException: null
        at org.bukkit.plugin.EventExecutor$2.execute(EventExecutor.java:72) ~[patched_1.12.2.jar:git-Paper-1428]
        at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:78) ~[patched_1.12.2.jar:git-Paper-1428]
        at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62) ~[patched_1.12.2.jar:git-Paper-1428]
        at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:515) [patched_1.12.2.jar:git-Paper-1428]
        at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:500) [patched_1.12.2.jar:git-Paper-1428]
        at com.massivecraft.massivecore.event.EventMassiveCorePlayerLeave.run(EventMassiveCorePlayerLeave.java:84) [MassiveCore.jar:?]
        at com.massivecraft.massivecore.engine.EngineMassiveCorePlayerLeave.runQuit(EngineMassiveCorePlayerLeave.java:57) [MassiveCore.jar:?]
        at com.destroystokyo.paper.event.executor.asm.generated.GeneratedEventExecutor56.execute(Unknown Source) [?:?]
        at org.bukkit.plugin.EventExecutor$2.execute(EventExecutor.java:70) [patched_1.12.2.jar:git-Paper-1428]
        at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:78) [patched_1.12.2.jar:git-Paper-1428]
        at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62) [patched_1.12.2.jar:git-Paper-1428]
        at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:515) [patched_1.12.2.jar:git-Paper-1428]
        at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:500) [patched_1.12.2.jar:git-Paper-1428]
        at net.minecraft.server.v1_12_R1.PlayerList.disconnect(PlayerList.java:429) [patched_1.12.2.jar:git-Paper-1428]
        at net.minecraft.server.v1_12_R1.PlayerConnection.a(PlayerConnection.java:1147) [patched_1.12.2.jar:git-Paper-1428]
        at net.minecraft.server.v1_12_R1.NetworkManager.handleDisconnection(NetworkManager.java:343) [patched_1.12.2.jar:git-Paper-1428]
        at net.minecraft.server.v1_12_R1.ServerConnection.c(ServerConnection.java:184) [patched_1.12.2.jar:git-Paper-1428]
        at net.minecraft.server.v1_12_R1.MinecraftServer.D(MinecraftServer.java:941) [patched_1.12.2.jar:git-Paper-1428]
        at net.minecraft.server.v1_12_R1.DedicatedServer.D(DedicatedServer.java:427) [patched_1.12.2.jar:git-Paper-1428]
        at net.minecraft.server.v1_12_R1.MinecraftServer.C(MinecraftServer.java:767) [patched_1.12.2.jar:git-Paper-1428]
        at net.minecraft.server.v1_12_R1.MinecraftServer.run(MinecraftServer.java:665) [patched_1.12.2.jar:git-Paper-1428]
        at java.lang.Thread.run(Thread.java:748) [?:1.8.0_171]
Caused by: java.lang.NullPointerException: attachment
        at com.massivecraft.massivecore.util.PermissionUtil.setAttachmentPermissions(PermissionUtil.java:480) ~[?:?]
        at com.massivecraft.massivecombat.entity.MPlayer.setFlaggedPermissions(MPlayer.java:231) ~[?:?]
        at com.massivecraft.massivecombat.entity.MPlayer.setFlaggedPermissions(MPlayer.java:218) ~[?:?]
        at com.massivecraft.massivecombat.entity.MPlayer.setFlaggedPermissions(MPlayer.java:212) ~[?:?]
        at com.massivecraft.massivecombat.entity.MPlayer.tickFlagged(MPlayer.java:287) ~[?:?]
        at com.massivecraft.massivecombat.entity.MPlayer.isFlagged(MPlayer.java:350) ~[?:?]
        at com.massivecraft.massivecombat.entity.MPlayer.isEnabled(MPlayer.java:102) ~[?:?]
        at com.massivecraft.massivecombat.entity.MPlayer.isEnabled(MPlayer.java:97) ~[?:?]
        at com.massivecraft.massivecombat.engine.EngineLogout.listener(EngineLogout.java:53) ~[?:?]
        at com.destroystokyo.paper.event.executor.asm.generated.GeneratedEventExecutor126.execute(Unknown Source) ~[?:?]
        at org.bukkit.plugin.EventExecutor$2.execute(EventExecutor.java:70) ~[patched_1.12.2.jar:git-Paper-1428]
        ... 21 more
commented

How did you conclude this is a LP issue? Not a single line in this stack trace is LP code

commented
  1. As I said, it started happening immediately after getting LP
  2. Read the second part of the stacktrace. It's a permissions error.
commented

MassiveCore (a lib used by MassiveCombat) is doing some very stupid things in order to modify attachment permissions. They absolutely should not be doing this - there is little to no benefit of their approach here.

I've added a workaround for it in LP (see the commit above) - but just want to be clear that this is absolutely an issue with MassiveCore, not LuckPerms.

commented

Still getting this with 4.2.17

commented

Try with 4.2.18, I've made further changes and tested it with MassiveCombat

seems to be working ok

f4e4f72

commented

^ this

commented

Just to reiterate what I said before:

MassiveCore (a lib used by MassiveCombat) is doing some very stupid things in order to modify attachment permissions. They absolutely should not be doing this - there is little to no benefit of their approach here.

The problematic code is in this class:

https://github.com/MassiveCraft/MassiveCore/blob/master/src/com/massivecraft/massivecore/util/PermissionUtil.java#L405-L493

They're using tons of reflection (a technique for accessing and invoking code outside of a classes normally accessible scope) to really achieve something very simple.

This unfortunately isn't uncommon, and I've had to write a number of workarounds so plugins like this continue to work.

https://github.com/lucko/LuckPerms/blob/master/bukkit/src/main/java/me/lucko/luckperms/bukkit/model/permissible/LPPermissible.java#L331-L416

https://github.com/lucko/LuckPerms/blob/master/bukkit/src/main/java/me/lucko/luckperms/bukkit/model/permissible/LPPermissionAttachment.java#L297-L416

These workarounds have fixed most plugins, but MassiveCore seems to be relying on implementation details for almost all of their code.

As far as I know, this commit 07b003c fixed the last issue you posted. Are you sure you were testing on 4.2.19?

commented

Totally not your fault, and the issue has been reported to the author for a long time now! No response from the original author.

I think it's pretty terrible that support is nonexistent for plugins with such high price tags.

I encourage you to make your feelings known via the respective review sections and try to get a refund or chargeback.

commented

Getting a new error with 4.2.19

[02:23:58 WARN]: [MassiveCombat] Task #58 for MassiveCombat v2.13.1 generated an exception
java.lang.UnsupportedOperationException: null
at java.util.AbstractList.add(AbstractList.java:148) ~[?:1.8.0_171]
at java.util.AbstractList.add(AbstractList.java:108) ~[?:1.8.0_171]
at com.massivecraft.massivecore.util.PermissionUtil.createPermissibleAttachment(PermissionUtil.java:430) ~[MassiveCore.jar:?]
at com.massivecraft.massivecore.util.PermissionUtil.getPermissibleAttachment(PermissionUtil.java:455) ~[MassiveCore.jar:?]
at com.massivecraft.massivecombat.entity.MPlayer.setFlaggedPermissions(MPlayer.java:228) ~[MassiveCombat.jar:?]
at com.massivecraft.massivecombat.entity.MPlayer.setFlaggedPermissions(MPlayer.java:218) ~[MassiveCombat.jar:?]
at com.massivecraft.massivecombat.entity.MPlayer.setFlaggedPermissions(MPlayer.java:212) ~[MassiveCombat.jar:?]
at com.massivecraft.massivecombat.entity.MPlayer.tickFlagged(MPlayer.java:287) ~[MassiveCombat.jar:?]
at com.massivecraft.massivecombat.engine.EngineFlag.tick(EngineFlag.java:56) ~[MassiveCombat.jar:?]
at com.massivecraft.massivecombat.engine.EngineFlag.tick(EngineFlag.java:49) ~[MassiveCombat.jar:?]
at com.massivecraft.massivecombat.engine.EngineFlag.run(EngineFlag.java:38) ~[MassiveCombat.jar:?]
at org.bukkit.craftbukkit.v1_12_R1.scheduler.CraftTask.run(CraftTask.java:63) ~[patched_1.12.2.jar:git-Paper-1428]
at org.bukkit.craftbukkit.v1_12_R1.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:415) [patched_1.12.2.jar:git-Paper-1428]
at net.minecraft.server.v1_12_R1.MinecraftServer.D(MinecraftServer.java:833) [patched_1.12.2.jar:git-Paper-1428]
at net.minecraft.server.v1_12_R1.DedicatedServer.D(DedicatedServer.java:427) [patched_1.12.2.jar:git-Paper-1428]
at net.minecraft.server.v1_12_R1.MinecraftServer.C(MinecraftServer.java:767) [patched_1.12.2.jar:git-Paper-1428]
at net.minecraft.server.v1_12_R1.MinecraftServer.run(MinecraftServer.java:665) [patched_1.12.2.jar:git-Paper-1428]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_171]

commented

@lucko Totally not your fault, and the issue has been reported to the author for a long time now! No response from the original author.

Opened issue: MassiveCraft/MassiveCore#341

It sucks that we need to rely on you on fixing something that it's not your fault, but we are very grateful for it and for your amazing plugin. Thank you lucko.

commented

Anyone know of an alternative plugin for adjusting attack speeds per item? That's all i really need mcombat for anyway..

commented

@Miclebrick so the issue with mcombat is only with the tag. The rest of the plugin functions normally.

WHat the error is saying is that MCore cannot check if a user is combat tagged or not. The attack speeds, durability, w/e else in mcombat all work fine. Only the combat tag breaks.

If you need a combat tagging plugin, i suggest combatlogX. With the current incompats with LP and mcombat, my server is using mcombat + combatlogX

commented

Turns out I had an outdated MCombat version, the errors with the latest version are fixed in luckperms .18

commented

I'm running the latest version of LuckPerms and MCombat and am still getting this issue.

commented

@Miclebrick Could you reopen this? Still getting this issue on latest version.

commented

Open a new ticket please and provide the errors you're getting.

commented

Alright, will do.