• Hello Guest! Did you know that ProjectKorra has an official Discord server? A lot of discussion about the official server, development process, and community discussion happens over there. Feel free to join now by clicking the link below.

    Join the Discord Server

Creating an Ability

Manil

Verified Member
Hey, if somebody could help me here, that'd be great. I'm trying to learn the basics of coding an ability, but I get stuck on step one. I tried following the updated tutorial by Finn_Bueno_, but I run into an importing issue/extending issue. I have added both the .jar file of the private testing server that I use and the ProjectKorra.jar plugin to referenced libraries, but I cannot import AbilityModule. Does anybody know why this might be happening?
 

Finn_Bueno_

Staff member
Plugin Developer
Verified Member
Hey, if somebody could help me here, that'd be great. I'm trying to learn the basics of coding an ability, but I get stuck on step one. I tried following the updated tutorial by Finn_Bueno_, but I run into an importing issue/extending issue. I have added both the .jar file of the private testing server that I use and the ProjectKorra.jar plugin to referenced libraries, but I cannot import AbilityModule. Does anybody know why this might be happening?
Those are actually not updated anymore, sorry about that. I can't be of much help currently.
 

xNuminousx

Verified Member
You should only be adding a spigot.jar and a projectkorra.jar as your build path, unless you are using some other library. And I don't recall AbilityModule being needed; must be something with the old API. As of now, for a basic ability you only need 2 classes: Your ability class then your ability Listener. Once you start getting more advanced you can create different classes for different purposes but the most basic of abilities will need these 2.

Your ability class will extend [Element]Ability and implement AddonAbility/ComboAbility/PassiveAbility/Whatever. Then once you fix the errors (creating the constructor, adding unimplemented methods, imports, etc) you should find that the rest is straight forward, if you've studied Java for a while.

Then of course your Listener will need to implement Listener and that's where you'll call the event that triggers your ability class.

If you're more of a visual learner you can always go to my GitHub and check out what I have imported there. If you need me to explain any of my code I'll be more than happy to do so. Hope this helps.
GITHUB
 

Manil

Verified Member
1) Yes, by the server .jar file I meant the spigot.jar
2) I sorta figured that since they're from about three years ago, but thanks for the clarification!
3) Thanks for the tips! (I'm more of a visual learner, so thanks for the GitHub!)
 
Top