Luckperms: Error with MassiveCombat

Created on 30 May 2018  路  18Comments  路  Source: lucko/LuckPerms

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
incompatibility issue

Most helpful comment

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.

All 18 comments

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

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

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.

Still getting this with 4.2.17

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

seems to be working ok

f4e4f727dd835463efbe40570e5dda2344273722

Getting a new error with 4.2.19

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]

@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: https://github.com/MassiveCraft/MassiveCore/issues/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.

^ this

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 https://github.com/lucko/LuckPerms/commit/07b003c77a4c76391f3d91e93b5581db59c2d65c fixed the last issue you posted. Are you sure you were testing on 4.2.19?

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.

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

@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

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

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

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

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

Alright, will do.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

SpaicyGaming picture SpaicyGaming  路  3Comments

chillerkraft picture chillerkraft  路  3Comments

GiaNTizmO picture GiaNTizmO  路  3Comments

Eustiya picture Eustiya  路  3Comments

sfxworks picture sfxworks  路  3Comments