Autorank

Autorank

380k Downloads

Issue with mcmmo power level on players joining

jasondavidcarr opened this issue ยท 14 comments

commented

Hello, first off, thank you for this wonderful plugin.

I'm running the release version of Autorank (version 3.3). I have mcmmo version 1.500-b3547. I'm getting the following error any time a player joins the server. My advanced config simply checks the mcmmo power level of users in order to rank them.

3:59:12 PM [SEVERE] Could not pass event PlayerJoinEvent to Autorank v3.3
3:59:12 PM org.bukkit.event.EventException
3:59:12 PM at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:294) ~[craftbukkit_beta_3092.jar:git-Bukkit-1.7.9-R0.1-10-g8688bd4-b3092jnks]
3:59:12 PM at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62) ~[craftbukkit_beta_3092.jar:git-Bukkit-1.7.9-R0.1-10-g8688bd4-b3092jnks]
3:59:12 PM at org.bukkit.plugin.TimedRegisteredListener.callEvent(TimedRegisteredListener.java:36) ~[craftbukkit_beta_3092.jar:git-Bukkit-1.7.9-R0.1-10-g8688bd4-b3092jnks]
3:59:12 PM at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:501) [craftbukkit_beta_3092.jar:git-Bukkit-1.7.9-R0.1-10-g8688bd4-b3092jnks]
3:59:12 PM at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:486) [craftbukkit_beta_3092.jar:git-Bukkit-1.7.9-R0.1-10-g8688bd4-b3092jnks]
3:59:12 PM at net.minecraft.server.v1_7_R3.PlayerList.c(PlayerList.java:251) [craftbukkit_beta_3092.jar:git-Bukkit-1.7.9-R0.1-10-g8688bd4-b3092jnks]
3:59:12 PM at net.minecraft.server.v1_7_R3.PlayerList.a(PlayerList.java:138) [craftbukkit_beta_3092.jar:git-Bukkit-1.7.9-R0.1-10-g8688bd4-b3092jnks]
3:59:12 PM at net.minecraft.server.v1_7_R3.LoginListener.c(LoginListener.java:76) [craftbukkit_beta_3092.jar:git-Bukkit-1.7.9-R0.1-10-g8688bd4-b3092jnks]
3:59:12 PM at net.minecraft.server.v1_7_R3.LoginListener.a(LoginListener.java:42) [craftbukkit_beta_3092.jar:git-Bukkit-1.7.9-R0.1-10-g8688bd4-b3092jnks]
3:59:12 PM at net.minecraft.server.v1_7_R3.NetworkManager.a(NetworkManager.java:160) [craftbukkit_beta_3092.jar:git-Bukkit-1.7.9-R0.1-10-g8688bd4-b3092jnks]
3:59:12 PM at net.minecraft.server.v1_7_R3.ServerConnection.c(SourceFile:134) [craftbukkit_beta_3092.jar:git-Bukkit-1.7.9-R0.1-10-g8688bd4-b3092jnks]
3:59:12 PM at net.minecraft.server.v1_7_R3.MinecraftServer.v(MinecraftServer.java:667) [craftbukkit_beta_3092.jar:git-Bukkit-1.7.9-R0.1-10-g8688bd4-b3092jnks]
3:59:12 PM at net.minecraft.server.v1_7_R3.DedicatedServer.v(DedicatedServer.java:260) [craftbukkit_beta_3092.jar:git-Bukkit-1.7.9-R0.1-10-g8688bd4-b3092jnks]
3:59:12 PM at net.minecraft.server.v1_7_R3.MinecraftServer.u(MinecraftServer.java:558) [craftbukkit_beta_3092.jar:git-Bukkit-1.7.9-R0.1-10-g8688bd4-b3092jnks]
3:59:12 PM at net.minecraft.server.v1_7_R3.MinecraftServer.run(MinecraftServer.java:469) [craftbukkit_beta_3092.jar:git-Bukkit-1.7.9-R0.1-10-g8688bd4-b3092jnks]
3:59:12 PM at net.minecraft.server.v1_7_R3.ThreadServerApplication.run(SourceFile:628) [craftbukkit_beta_3092.jar:git-Bukkit-1.7.9-R0.1-10-g8688bd4-b3092jnks]
3:59:12 PM Caused by: java.lang.IndexOutOfBoundsException: Index: 0
3:59:12 PM at java.util.Collections$EmptyList.get(Unknown Source) ~[?:1.7.0_67]
3:59:12 PM at com.gmail.nossr50.util.player.UserManager.getPlayer(UserManager.java:94) ~[?:?]
3:59:12 PM at com.gmail.nossr50.api.ExperienceAPI.getPowerLevel(ExperienceAPI.java:398) ~[?:?]
3:59:12 PM at me.armar.plugins.autorank.hooks.mcmmoapi.McMMOHandler.getPowerLevel(McMMOHandler.java:48) ~[?:?]
3:59:12 PM at me.armar.plugins.autorank.playerchecker.requirement.McMMOPowerLevelRequirement.meetsRequirement(McMMOPowerLevelRequirement.java:36) ~[?:?]
3:59:12 PM at me.armar.plugins.autorank.playerchecker.RankChange.checkRequirements(RankChange.java:102) ~[?:?]
3:59:12 PM at me.armar.plugins.autorank.playerchecker.RankChange.applyChange(RankChange.java:35) ~[?:?]
3:59:12 PM at me.armar.plugins.autorank.playerchecker.PlayerChecker.checkPlayer(PlayerChecker.java:64) ~[?:?]
3:59:12 PM at me.armar.plugins.autorank.listeners.PlayerJoinListener.onPlayerJoin(PlayerJoinListener.java:35) ~[?:?]

commented

It seems Autorank is trying to check a player's mcmmo power level, but mcmmo tells Autorank that this player isn't stored. Does the player have an mcmmo record?

commented

Oddly, it's happening every time any player logs in, whether they have an mcmmo record or not. The plugin is still working fine, just get these errors on login. Users are still promoted just fine after 5 minutes.

Thanks for looking into this, Staartvin. :)

commented

Okay, thanks. I'll report it to mcmmo.

commented

Hmm, I don't think it is an actual problem with Autorank. You might want to report this to mcmmo so they can fix it. The underlaying problem is that mcmmo can't find the player Autorank asked for.

commented

Okay, well, I'm going down a useless rabbit hole it seems. Turns out that the only reason I wasn't getting the error when granting '*' permissions is simply because it enabled Autorank's exclude permissions (so the Autorank stuff was not running on join). So, as it turns out, it appears to have nothing to do with permissions. Sorry for that.

commented

However, I have confirmed that the issue is easy to replicate with default configurations; all that is needed is to use mcMMO's power levels, and you'll get the error with the default configs.

commented

Alright, I reported this to mcmmo, but haven't yet received a response. But I've done some more significant testing and figured it'd still be good to share.

I started with a brand new Bukkit installation of build 3092, completely configuration free. I added current release versions of Essentials, GroupManager, mcMMO, and Autorank. Then I configured AutoRank to check the mcMMO power level for the Default group to upgrade it to Builder if it's greater than 100. I then get the above errors any time any user joins the server, so it's very easy to replicate with mostly default settings.

However, if I grant whoever is joining the server '*' permissions, then I do not get the error. I'm working on identifying the specific permissions that are causing the issue.

I've granted all mcMMO permissions and Autorank permissions (sans for exclude ones), and I do still get the error, so I know it's not mcMMO or Autorank permissions that are the problem.

commented

Okay, with the default GroupManager groups, I no longer get the error when I join the Moderator group. So obviously the problematic permission is something within the default Moderator permissions. Unfortunately that means it's something I probably can't give out to everyone. It's certainly hard to hunt down the specific permission at this point, but I'll keep trying to filter it out.

commented

I will test it on my local machine and get back with you with the results!

commented

Closed due to inactivity, reopen if issue still persists.

commented

I'm running the release version of Autorank v3.4-Dev-311. I have mcmmo version 1.5.0.1 and using https://ci.drtshock.net/job/MCMMO/22/

03.01 22:18:00 [Server] INFO at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_03]
03.01 22:18:00 [Server] INFO at sun.reflect.GeneratedMethodAccessor435.invoke(Unknown Source) ~[?:?]
03.01 22:18:00 [Server] INFO at me.armar.plugins.autorank.listeners.PlayerJoinListener.onPlayerJoin(PlayerJoinListener.java:41) ~[?:?]
03.01 22:18:00 [Server] INFO at me.armar.plugins.autorank.playerchecker.PlayerChecker.checkPlayer(PlayerChecker.java:64) ~[?:?]
03.01 22:18:00 [Server] INFO at me.armar.plugins.autorank.playerchecker.RankChange.applyChange(RankChange.java:35) ~[?:?]
03.01 22:18:00 [Server] INFO at me.armar.plugins.autorank.playerchecker.RankChange.checkRequirements(RankChange.java:99) ~[?:?]
03.01 22:18:00 [Server] INFO at me.armar.plugins.autorank.playerchecker.requirement.McMMOPowerLevelRequirement.meetsRequirement(McMMOPowerLevelRequirement.java:36) ~[?:?]
03.01 22:18:00 [Server] INFO at me.armar.plugins.autorank.hooks.mcmmoapi.McMMOHandler.getPowerLevel(McMMOHandler.java:48) ~[?:?]
03.01 22:18:00 [Server] INFO at com.gmail.nossr50.api.ExperienceAPI.getPowerLevel(ExperienceAPI.java:701) ~[?:?]
03.01 22:18:00 [Server] INFO at com.gmail.nossr50.api.ExperienceAPI.getPlayer(ExperienceAPI.java:1097) ~[?:?]
03.01 22:18:00 [Server] INFO Caused by: com.gmail.nossr50.api.exceptions.McMMOPlayerNotFoundException: McMMOPlayer object was not found for: Minten51c 8db90313-b4a3-4b75-9d74-27aa8916178c
03.01 22:18:00 [Server] INFO at java.lang.Thread.run(Unknown Source) [?:1.7.0_03]
03.01 22:18:00 [Server] INFO at net.minecraft.server.v1_8_R1.MinecraftServer.run(MinecraftServer.java:506) [custom.jar:git-Bukkit-0899683]
03.01 22:18:00 [Server] INFO at net.minecraft.server.v1_8_R1.MinecraftServer.y(MinecraftServer.java:598) [custom.jar:git-Bukkit-0899683]
03.01 22:18:00 [Server] INFO at net.minecraft.server.v1_8_R1.DedicatedServer.z(DedicatedServer.java:284) [custom.jar:git-Bukkit-0899683]
03.01 22:18:00 [Server] INFO at net.minecraft.server.v1_8_R1.MinecraftServer.z(MinecraftServer.java:718) [custom.jar:git-Bukkit-0899683]
03.01 22:18:00 [Server] INFO at net.minecraft.server.v1_8_R1.ServerConnection.c(SourceFile:151) [custom.jar:git-Bukkit-0899683]
03.01 22:18:00 [Server] INFO at net.minecraft.server.v1_8_R1.NetworkManager.a(NetworkManager.java:150) [custom.jar:git-Bukkit-0899683]
03.01 22:18:00 [Server] INFO at net.minecraft.server.v1_8_R1.LoginListener.c(LoginListener.java:41) [custom.jar:git-Bukkit-0899683]
03.01 22:18:00 [Server] INFO at net.minecraft.server.v1_8_R1.LoginListener.b(LoginListener.java:81) [custom.jar:git-Bukkit-0899683]
03.01 22:18:00 [Server] INFO at net.minecraft.server.v1_8_R1.PlayerList.a(PlayerList.java:134) [custom.jar:git-Bukkit-0899683]
03.01 22:18:00 [Server] INFO at net.minecraft.server.v1_8_R1.PlayerList.onPlayerJoin(PlayerList.java:249) [custom.jar:git-Bukkit-0899683]
03.01 22:18:00 [Server] INFO at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:486) [custom.jar:git-Bukkit-0899683]
03.01 22:18:00 [Server] INFO at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:501) [custom.jar:git-Bukkit-0899683]
03.01 22:18:00 [Server] INFO at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62) ~[custom.jar:git-Bukkit-0899683]
03.01 22:18:00 [Server] INFO at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:297) ~[custom.jar:git-Bukkit-0899683]
03.01 22:18:00 [Server] INFO org.bukkit.event.EventException
03.01 22:18:00 [Server] ERROR Could not pass event PlayerJoinEvent to Autorank v3.4-Dev-311

commented

Noticed the issue with following:

WARN Skill 'Axes' is not a valid skill!
WARN Skill 'Archery' is not a valid skill!
WARN Skill 'Acrobatics' is not a valid skill!
WARN Skill 'Herbalism' is not a valid skill!

But might be others!

commented

Please open a new ticket instead of replying to this one.

commented

Update from today:

Environment:
Java version: 1.7.0_03 Oracle Corporation
Operating system: Linux 2.6.38-8-server amd64
Bukkit version: git-Bukkit-0643caa (MC: 1.8)

Autorank v3.4-Dev-318.
Mcmmo version 1.5.0.1 via https://ci.drtshock.net/job/MCMMO/23/

13.01 00:07:45 [Server] INFO at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_03]
13.01 00:07:45 [Server] INFO at sun.reflect.GeneratedMethodAccessor521.invoke(Unknown Source) ~[?:?]
13.01 00:07:45 [Server] INFO at me.armar.plugins.autorank.listeners.PlayerJoinListener.onPlayerJoin(PlayerJoinListener.java:41) ~[?:?]
13.01 00:07:45 [Server] INFO at me.armar.plugins.autorank.playerchecker.PlayerChecker.checkPlayer(PlayerChecker.java:64) ~[?:?]
13.01 00:07:45 [Server] INFO at me.armar.plugins.autorank.playerchecker.RankChange.applyChange(RankChange.java:35) ~[?:?]
13.01 00:07:45 [Server] INFO at me.armar.plugins.autorank.playerchecker.RankChange.checkRequirements(RankChange.java:99) ~[?:?]
13.01 00:07:45 [Server] INFO at me.armar.plugins.autorank.playerchecker.requirement.McMMOPowerLevelRequirement.meetsRequirement(McMMOPowerLevelRequirement.java:33) ~[?:?]
13.01 00:07:45 [Server] INFO at me.armar.plugins.autorank.hooks.mcmmoapi.McMMOHandler.getPowerLevel(McMMOHandler.java:48) ~[?:?]
13.01 00:07:45 [Server] INFO at com.gmail.nossr50.api.ExperienceAPI.getPowerLevel(ExperienceAPI.java:701) ~[?:?]
13.01 00:07:45 [Server] INFO at com.gmail.nossr50.api.ExperienceAPI.getPlayer(ExperienceAPI.java:1097) ~[?:?]
13.01 00:07:45 [Server] INFO Caused by: com.gmail.nossr50.api.exceptions.McMMOPlayerNotFoundException: McMMOPlayer object was not found for: N00667718 635fcd31-d72a-4d2a-ba5f-39735521b245
13.01 00:07:45 [Server] INFO at java.lang.Thread.run(Unknown Source) [?:1.7.0_03]
13.01 00:07:45 [Server] INFO at net.minecraft.server.v1_8_R1.MinecraftServer.run(MinecraftServer.java:506) [custom.jar:git-Bukkit-0643caa]
13.01 00:07:45 [Server] INFO at net.minecraft.server.v1_8_R1.MinecraftServer.y(MinecraftServer.java:598) [custom.jar:git-Bukkit-0643caa]
13.01 00:07:45 [Server] INFO at net.minecraft.server.v1_8_R1.DedicatedServer.z(DedicatedServer.java:284) [custom.jar:git-Bukkit-0643caa]
13.01 00:07:45 [Server] INFO at net.minecraft.server.v1_8_R1.MinecraftServer.z(MinecraftServer.java:718) [custom.jar:git-Bukkit-0643caa]
13.01 00:07:45 [Server] INFO at net.minecraft.server.v1_8_R1.ServerConnection.c(SourceFile:151) [custom.jar:git-Bukkit-0643caa]
13.01 00:07:45 [Server] INFO at net.minecraft.server.v1_8_R1.NetworkManager.a(NetworkManager.java:150) [custom.jar:git-Bukkit-0643caa]
13.01 00:07:45 [Server] INFO at net.minecraft.server.v1_8_R1.LoginListener.c(LoginListener.java:41) [custom.jar:git-Bukkit-0643caa]
13.01 00:07:45 [Server] INFO at net.minecraft.server.v1_8_R1.LoginListener.b(LoginListener.java:81) [custom.jar:git-Bukkit-0643caa]
13.01 00:07:45 [Server] INFO at net.minecraft.server.v1_8_R1.PlayerList.a(PlayerList.java:134) [custom.jar:git-Bukkit-0643caa]
13.01 00:07:45 [Server] INFO at net.minecraft.server.v1_8_R1.PlayerList.onPlayerJoin(PlayerList.java:249) [custom.jar:git-Bukkit-0643caa]
13.01 00:07:45 [Server] INFO at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:486) [custom.jar:git-Bukkit-0643caa]
13.01 00:07:45 [Server] INFO at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:501) [custom.jar:git-Bukkit-0643caa]
13.01 00:07:45 [Server] INFO at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62) ~[custom.jar:git-Bukkit-0643caa]
13.01 00:07:45 [Server] INFO at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:297) ~[custom.jar:git-Bukkit-0643caa]
13.01 00:07:45 [Server] INFO org.bukkit.event.EventException
13.01 00:07:45 [Server] ERROR Could not pass event PlayerJoinEvent to Autorank v3.4-Dev-318