elBukkit/MagicPlugin

mskills has an internal error

Cypher487 opened this issue · 12 comments

Hi, the integration between Magic and Heroes is a little wonky. Magic uses the Heroes' mana which is great! And things work EXCEPT that the mskills command generates an internal error and doesn't work at all. I'm trying to get the Heroes' skills on the hotbar if that helps any.

The internal error is as follows:
[12:14:08] [Server thread/INFO]: Aerbyn issued server command: /mskills
[12:14:08] [Server thread/ERROR]: null
org.bukkit.command.CommandException: Unhandled exception executing command 'mskills' in plugin Magic v10.8.13-51eeb6a
at org.bukkit.command.PluginCommand.execute(PluginCommand.java:47) ~[paper-api-1.20.2-R0.1-SNAPSHOT.jar:?]
at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:155) ~[paper-api-1.20.2-R0.1-SNAPSHOT.jar:?]
at org.bukkit.craftbukkit.v1_20_R2.CraftServer.dispatchCommand(CraftServer.java:991) ~[paper-1.20.2.jar:git-Paper-"931781c"]
at org.bukkit.craftbukkit.v1_20_R2.command.BukkitCommandWrapper.run(BukkitCommandWrapper.java:64) ~[paper-1.20.2.jar:git-Paper-"931781c"]
at com.mojang.brigadier.CommandDispatcher.execute(CommandDispatcher.java:265) ~[paper-1.20.2.jar:?]
at net.minecraft.commands.Commands.performCommand(Commands.java:330) ~[?:?]
at net.minecraft.commands.Commands.performCommand(Commands.java:314) ~[?:?]
at net.minecraft.server.network.ServerGamePacketListenerImpl.performChatCommand(ServerGamePacketListenerImpl.java:2208) ~[?:?]
at net.minecraft.server.network.ServerGamePacketListenerImpl.lambda$handleChatCommand$19(ServerGamePacketListenerImpl.java:2168) ~[?:?]
at net.minecraft.util.thread.BlockableEventLoop.lambda$submitAsync$0(BlockableEventLoop.java:59) ~[?:?]
at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1768) ~[?:?]
at net.minecraft.server.TickTask.run(TickTask.java:18) ~[paper-1.20.2.jar:git-Paper-"931781c"]
at net.minecraft.util.thread.BlockableEventLoop.doRunTask(BlockableEventLoop.java:153) ~[?:?]
at net.minecraft.util.thread.ReentrantBlockableEventLoop.doRunTask(ReentrantBlockableEventLoop.java:24) ~[?:?]
at net.minecraft.server.MinecraftServer.doRunTask(MinecraftServer.java:1324) ~[paper-1.20.2.jar:git-Paper-"931781c"]
at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:193) ~[paper-1.20.2.jar:git-Paper-"931781c"]
at net.minecraft.util.thread.BlockableEventLoop.pollTask(BlockableEventLoop.java:126) ~[?:?]
at net.minecraft.server.MinecraftServer.pollTaskInternal(MinecraftServer.java:1301) ~[paper-1.20.2.jar:git-Paper-"931781c"]
at net.minecraft.server.MinecraftServer.pollTask(MinecraftServer.java:1294) ~[paper-1.20.2.jar:git-Paper-"931781c"]
at net.minecraft.util.thread.BlockableEventLoop.managedBlock(BlockableEventLoop.java:136) ~[?:?]
at net.minecraft.server.MinecraftServer.waitUntilNextTick(MinecraftServer.java:1272) ~[paper-1.20.2.jar:git-Paper-"931781c"]
at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1160) ~[paper-1.20.2.jar:git-Paper-"931781c"]
at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:315) ~[paper-1.20.2.jar:git-Paper-"931781c"]
at java.lang.Thread.run(Thread.java:833) ~[?:?]
Caused by: java.lang.NoSuchFieldError: LEVEL
at com.elmakers.mine.bukkit.heroes.HeroesManager.mapSkillsByLevel(HeroesManager.java:180) ~[Magic-10.8.13.jar:?]
at com.elmakers.mine.bukkit.heroes.HeroesManager.getSkillList(HeroesManager.java:154) ~[Magic-10.8.13.jar:?]
at com.elmakers.mine.bukkit.action.builtin.SkillSelectorAction.perform(SkillSelectorAction.java:79) ~[Magic-10.8.13.jar:?]
at com.elmakers.mine.bukkit.action.ActionContext.perform(ActionContext.java:43) ~[Magic-10.8.13.jar:?]
at com.elmakers.mine.bukkit.action.ActionHandler.perform(ActionHandler.java:221) ~[Magic-10.8.13.jar:?]
at com.elmakers.mine.bukkit.action.ActionHandler.cast(ActionHandler.java:158) ~[Magic-10.8.13.jar:?]
at com.elmakers.mine.bukkit.spell.ActionSpell.startCast(ActionSpell.java:172) ~[Magic-10.8.13.jar:?]
at com.elmakers.mine.bukkit.spell.ActionSpell.onCast(ActionSpell.java:154) ~[Magic-10.8.13.jar:?]
at com.elmakers.mine.bukkit.spell.BaseSpell.finalizeCast(BaseSpell.java:1769) ~[Magic-10.8.13.jar:?]
at com.elmakers.mine.bukkit.spell.BaseSpell.cast(BaseSpell.java:1566) ~[Magic-10.8.13.jar:?]
at com.elmakers.mine.bukkit.spell.BaseSpell.cast(BaseSpell.java:1447) ~[Magic-10.8.13.jar:?]
at com.elmakers.mine.bukkit.spell.BaseSpell.cast(BaseSpell.java:1571) ~[Magic-10.8.13.jar:?]
at com.elmakers.mine.bukkit.magic.command.MagicSkillsCommandExecutor.onCommand(MagicSkillsCommandExecutor.java:48) ~[Magic-10.8.13.jar:?]
at org.bukkit.command.PluginCommand.execute(PluginCommand.java:45) ~[paper-api-1.20.2-R0.1-SNAPSHOT.jar:?]
... 23 more

I'm not sure if I set up anything wrong or if there's an issue with the integration. Please advise. 

I haven'd looked at the Heroes integration in years - offhand it looks like maybe that's an old Heroes version from before skills had levels?

Not really sure- but if all you want is Heroes skills on a hotbar I'd suggest removing Magic and trying this plugin instead:

https://github.com/elBukkit/HeroesHotbar/releases

I feared as much. Ah well, back to the drawing board ig. Thanks regardless

Did you want to try the plugin I linked before giving up?

Ah dammit. Didnt mean to do that- nah I do want Magic as part of it and I was trying to figure out a way of making them both compatible

Did you want to try the plugin I linked before giving up?

I already did and that in and of itself didn't work. Generated a very similar internal error

What version of Heroes are you using? Can you show the output of all of the following commands?

/version
/version Heroes
/version Magic

I may be able to do something about it if your Heroes build isn't really outdated.

But I will say that trying to use both is probably going to be a mess and possibly confusing to players. The integration is kind of made for that, but 99% of the time people just wanted the hotbar which is why I made a separate plugin for that.

What version of Heroes are you using? Can you show the output of all of the following commands?

/version
/version Heroes
/version Magic

I may be able to do something about it if your Heroes build isn't really outdated.

But I will say that trying to use both is probably going to be a mess and possibly confusing to players. The integration is kind of made for that, but 99% of the time people just wanted the hotbar which is why I made a separate plugin for that.

Yeah sure thing!

19.03 11:42:01 [PebbleHost] ASec ran command: version
19.03 11:42:01 [Server] [INFO] Checking version, please wait...
19.03 11:42:02 [Server] [INFO] This server is running Paper version git-Paper-"931781c" (MC: 1.20.2) (Implementing API version 1.20.2-R0.1-SNAPSHOT) (Git: 931781c)
19.03 11:42:02 [Server] [INFO] You are 262 version(s) behind
19.03 11:42:02 [Server] [INFO] Download the new version at: https://papermc.io/downloads/paper
19.03 11:42:02 [Server] [INFO] Previous version: git-Paper-"07b956e" (MC: 1.20.4)
19.03 11:42:09 [PebbleHost] ASec ran command: version heroes
19.03 11:42:09 [Server] [INFO] Heroes version 1.10.4-SNAPSHOTed96dc4d
19.03 11:42:09 [Server] [INFO] Experience, leveling, skills and class system for Minecraft developed by Herocraft Development.
19.03 11:42:09 [Server] [INFO] Website: http://www.herocraftonline.com
19.03 11:42:09 [Server] [INFO] Authors: Kainzo, Sleaker, Mung3r, greatman32, Delfofthebla, kashike, Ampayne2, Soren_Endon, MysticMight and RAVINGAR
19.03 11:42:16 [PebbleHost] ASec ran command: version magic
19.03 11:42:16 [Server] [INFO] Magic version 10.8.13-51eeb6a
19.03 11:42:16 [Server] [INFO] A gameplay-oriented plugin for spells and wands
19.03 11:42:16 [Server] [INFO] Website: http://mine.elmakers.com
19.03 11:42:16 [Server] [INFO] Author: NathanWolf

I get that it can be confusing... But if I can get this to work together then I'm sure I can figure the rest out heh

Thanks, I will take a look when I can

Just wanted to update you, I'm playing around with configs, plugins, and trying to get things to work and most notably I installed Heroes Hotbar and it generated an internal error upon doing the /skillmenu command. https://pastebin.com/1vSRFHQi

And... Sorry for my confusing messages, I was at work earlier and was hella distracted so thank you for your patience and hard work :D

I looked into this a little and the problem is that Heroes updated the way they represent levels on skills.

I don't see that they have a Maven repository anymore, so I can't build against more updated versions of their plugin.

I can't really host it myself since my plugin is open source, anyone who builds it would get the Heroes plugin by way of dependency download.

So I'm not honestly sure I will be able to fix this.

Hm well I maybe spoke too soon 😅
Try this dev build when it's ready, please: https://jenkins.elmakers.com/job/MagicPlugin/4276/

My Heroes test environment is pretty messed up after updating, but I think I got the errors fixed and the hotbar should be working.

Nathan you legend! It works! Mostly. The only 2 minor issues I'm noting is that the skills are all listed under level "1" but players can only choose the skills they have unlocked which is fine. The other one, which I find a little more weird is that I have Magic Missile just chilling there and I can use it without a wand or spellbook- UNLESS this can technically count as a spellbook too- though I could be wrong.

All in all, you did it. And I really appreciate you for this. If you have a donation link I'll happily donate a little as a thank you :D