• 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

PK's .jar

Manil

Member
Hi, I'm not going to pretend to know a whole lot about java here, but is there a way to access the PK coding by adding it as a library to sort through a player command input and determine whether or not it's a valid move? I ask because I'm trying to fix a broken bending board for a server.
 

xNuminousx

Member
I'm not really understanding what you're trying to achieve here. You ask if there's a way to access ProjectKorra's code by adding it as a library (which I think there may be an Eclipse extension that could decompile libraries) but then you continue to say "to sort through player command input and determine whether or not it's a valid move" Are you wanting to know if a command is successful (move = command attempt) or are you wanting to check for abilities (move = ability name)? Imma need more explanation.
 

Manil

Member
What I'm trying to ask is whether or not I can access the method that ProjectKorra uses to determine if a move is valid when a player enters a command like /pk h <move> for example.
 

Manil

Member
I'm believe I would be trying to look at them. I'm trying to make a substitute for the BendingBoard plugin until it's updated.
 

Simplicitee

Staff member
Plugin Developer
If you want to check if an ability is loaded onto the server, you can check if the corresponding CoreAbility exists by doing
Java:
CoreAbility.getAbility(abilityName) != null
If you want to check if the player can use the ability use
Java:
bPlayer.canBend(ability) //where bPlayer is the BendingPlayer instance for the player and ability is the CoreAbility instance of what you're checking
 
Top