elBukkit / MagicPlugin

A Bukkit plugin for spells, wands and other magic
http://mine.elmakers.com
MIT License
232 stars 152 forks source link

Heroes Integration #1053

Open Gyztor opened 2 years ago

Gyztor commented 2 years ago

I read through the wiki and was wondering if proper heroes integration support will be coming back or something that would allow the magic plugin to have some control over the heroes plugin; As having these two plugins work together would allow me to use the wands and certain features of the Magic plugin (like how it handles mana regen and everything else) to have control over the heroes plugin. Or is that not planned at all?

Gyztor commented 2 years ago

actually i think i might have found some workarounds for it to work properly knocks on wood

NathanWolf commented 2 years ago

/mexample add heroes should still be all you need to turn that on. /mgive heroes will give you a wand that has your Heroes skills on it as spells.

Gyztor commented 2 years ago

thank you! i also figured out you can add heroes: true to wands you made to include those spells, i wish i could have magic take control of the mana but it seems only heroes can do that atm

Gyztor commented 2 years ago

also does https://github.com/elBukkit/MagicHeroes still work as intended?

Gyztor commented 2 years ago

i found it from the instructions here: https://github.com/elBukkit/MagicPlugin/wiki/Heroes

Gyztor commented 2 years ago

or is it not needed anymore?

Gyztor commented 2 years ago

i should probably mention my goal for this, i want to make it so that the magic plugin acts more of a plugin for just the magic while heroes handles the classes, races and other skills that arent necessarily magic based, if they are wanted. (i also want to use magic for its amazing spell inventory). i also want heroes to handle the leveling of spells and classes of magic too

edit: fixed some late night grammer of mine to make sense

killme commented 2 years ago

If you don't mind, please think of what you want to say before placing a comment - so you can leave one instead of five. Anyone watching this repository will get an email for every single comment you place, which is excessive.

If you're looking for a more chat-like place to discuss magic, I'd suggest you join the discord.

Gyztor commented 2 years ago

I am sorry, i wasn't really thinking about it at the time and somewhat forgot that it sends emails (as i am used to it never sending emails to me) it was also a late night going on a 20th hour with no sleep. i will attempt to put more in my messages if i can think of everything at once,

Also i updated https://github.com/elBukkit/MagicHeroes and got it working again and am going to attempt it for my idea as mentioned above as so far i have not found another way to intagrate t

Gyztor commented 2 years ago

Sort of found out something for this and also got more stuff to work with it though i have been seeing this sort of glitch where the icons dont exist (figured this one out) and it doesnt show the mana amount a skill takes. how it (technically) should look(ish): image how it actually ends up looking image

Gyztor commented 2 years ago

The HeroesHotbar plugin had the icons (figured this one out) and description working properly but it couldn't be used with spell inventory and on top of that it seems to be broken now due to the most recent heroes update it seem to be returning "null" in console. error for context (that only popped up with the new heroes version, 1.9.21):

[03:47:01 ERROR]: null
org.bukkit.command.CommandException: Unhandled exception executing command 'skillmenu' in plugin HeroesHotbar v2.0
        at org.bukkit.command.PluginCommand.execute(PluginCommand.java:47) ~[paper-api-1.18.2-R0.1-SNAPSHOT.jar:?]
        at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:159) ~[paper-api-1.18.2-R0.1-SNAPSHOT.jar:?]
        at org.bukkit.craftbukkit.v1_18_R2.CraftServer.dispatchCommand(CraftServer.java:906) ~[paper-1.18.2.jar:git-Paper-329]
        at net.minecraft.server.network.ServerGamePacketListenerImpl.handleCommand(ServerGamePacketListenerImpl.java:2306) ~[?:?]
        at net.minecraft.server.network.ServerGamePacketListenerImpl.handleChat(ServerGamePacketListenerImpl.java:2117) ~[?:?]
        at net.minecraft.server.network.ServerGamePacketListenerImpl.handleChat(ServerGamePacketListenerImpl.java:2098) ~[?:?]
        at net.minecraft.network.protocol.game.ServerboundChatPacket.handle(ServerboundChatPacket.java:46) ~[?:?]
        at net.minecraft.network.protocol.game.ServerboundChatPacket.a(ServerboundChatPacket.java:6) ~[?:?]
        at net.minecraft.network.protocol.PacketUtils.lambda$ensureRunningOnSameThread$1(PacketUtils.java:51) ~[?:?]
        at net.minecraft.server.TickTask.run(TickTask.java:18) ~[paper-1.18.2.jar:git-Paper-329]
        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:1399) ~[paper-1.18.2.jar:git-Paper-329]
        at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:188) ~[paper-1.18.2.jar:git-Paper-329]
        at net.minecraft.util.thread.BlockableEventLoop.pollTask(BlockableEventLoop.java:126) ~[?:?]
        at net.minecraft.server.MinecraftServer.pollTaskInternal(MinecraftServer.java:1376) ~[paper-1.18.2.jar:git-Paper-329]
        at net.minecraft.server.MinecraftServer.pollTask(MinecraftServer.java:1369) ~[paper-1.18.2.jar:git-Paper-329]
        at net.minecraft.util.thread.BlockableEventLoop.managedBlock(BlockableEventLoop.java:136) ~[?:?]
        at net.minecraft.server.MinecraftServer.waitUntilNextTick(MinecraftServer.java:1347) ~[paper-1.18.2.jar:git-Paper-329]
        at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1229) ~[paper-1.18.2.jar:git-Paper-329]
        at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:315) ~[paper-1.18.2.jar:git-Paper-329]
        at java.lang.Thread.run(Thread.java:833) ~[?:?]
Caused by: java.lang.IllegalArgumentException: No enum constant org.bukkit.Material.LEATHER_HELMET:#A06540
        at java.lang.Enum.valueOf(Enum.java:273) ~[?:?]
        at org.bukkit.Material.valueOf(Material.java:106) ~[paper-api-1.18.2-R0.1-SNAPSHOT.jar:?]
        at com.elmakers.mine.bukkit.heroes.MaterialAndData.<init>(MaterialAndData.java:81) ~[HeroesHotbar-2.0.jar:?]
        at com.elmakers.mine.bukkit.heroes.SkillDescription.<init>(SkillDescription.java:26) ~[HeroesHotbar-2.0.jar:?]
        at com.elmakers.mine.bukkit.heroes.SkillSelector.<init>(SkillSelector.java:38) ~[HeroesHotbar-2.0.jar:?]
        at com.elmakers.mine.bukkit.heroes.SkillsMenuCommandExecutor.showSkillsMenu(SkillsMenuCommandExecutor.java:46) ~[HeroesHotbar-2.0.jar:?]
        at com.elmakers.mine.bukkit.heroes.SkillsMenuCommandExecutor.onCommand(SkillsMenuCommandExecutor.java:41) ~[HeroesHotbar-2.0.jar:?]
        at org.bukkit.command.PluginCommand.execute(PluginCommand.java:45) ~[paper-api-1.18.2-R0.1-SNAPSHOT.jar:?]
        ... 21 more

so the main thing that comes to mind at the moment is, would it be possible to add in how HeroesHotbar displays stuff with the /skillmenu command into the new way of how its handled with /mskills in the magic plugin or is this something not seen for the forseeable future? I have been considering doing it myself but i honestly don't know how to code java (or really much of anything) at this moment (due to my broken knowledge of not having my classes ever taken further than the literally bottom of the barrel basics and being unable to find anything good to help me relearn from scratch). I also have another question, would it also be possible to make it so that there is integration with the heroes plugin that makes magic 100% use the heroes class paths or is it possible i missed something by chance with that?

NathanWolf commented 2 years ago

I am not fully following all of this, but HeroesHotbar is for people that don't want to use Magic+Heroes. You should not need both.

Gyztor commented 2 years ago

yeah, i only had it for testing how to handled the UI to make sure it works, but i want reverse integration from magic -> heroes. so that everything levels with the heroes classes and subclasses while also making the descriptions and icons look similar to how they should image this is what usually happens in the /mskills when you try to reverse integrate magic INTO heroes to use the functions of how heroes does classes and subclasses with magic's spells, the only think i sort of know how to fix is the icons but the description is broken and doesnt show the "consumes mana" properly, i am still not sure if i am giving enough info because my thoughts are somewhat not able to form correctly making me brain dump (which is something on me). but i have been using https://github.com/elBukkit/MagicHeroes to reverse integrate magic -> heroes, i tried to update it some to the best of my ability to work better (which it does work now) but i am still getting these few things like how in the image the "consumes mana" is broken

NathanWolf commented 2 years ago

That looks like it is missing a localization section .. odd though because that one is supposed to default to "$amount".

I will look into this if I get some time, but I'll be honest that there are more pressing issues than the Heroes integration at the moment.

Gyztor commented 2 years ago

thats fine, i dont mind it taking time tbh as long as its known is and is on the radar to be handled eventually