• 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

Addon Developers - Let's Discuss Expanding the API

jedk1

New Member
Haha. All these methods I didnt know existed.. I have to think of some more.
Simplest way to find out if it exists, and this is what i do, in eclipse type "Methods." and then scroll thru what auto complete gives you. It's very useful while there arent any javadocs.
 

jedk1

New Member
Another thought i just had, that isnt exactly tied into the API, but it involves TempBlocks. Now as far as I can tell, this isnt a thing but. What if say, instead of using:
new TempBlock(Block block, Material material, Byte materialData);
then doing a bunch of regen code, you could just do:
new TempBlock(Block block, Material material, Byte materialData, Long regenDelay);
 

SenpaiBlaze

Verified Member
You could easily do

which is really easy :3
It doesn't seem to work as well in an if method. Maybe project Korra could form it into some way like if (!methods.blockUnder = isEarth/WaterBendable) I know this might sound and or look stupid, and excuse me if I screwed up the format, but really, it could be very useful.
 

SenpaiBlaze

Verified Member
Lets scratch my idea above


Block block = player.getLocation().clone().add(0, -1, 0).getBlock();

if(!Methods.isIcebendable(block))

#Bae I love this method now. Thanks Jed for the block idea :p
 

Finn_Bueno_

Staff member
Plugin Developer
Verified Member
I don't know how coding works, nor if what I am going to say is already possible, but I am just going to say it because I think it would be nice.

Maybe allow coders to hook into the ProjectKorra (Items) plugin? So they can add stats to the add-on, and when you install the move, you can use those stats.

Just an idea :p
 

Simplicitee

Staff member
Plugin Developer
Verified Member
Few suggestions:
A isAvatar method.
A getAvatar method
Avatar be an applicable element.

That's all for now, sorry if these exist and I can't find them
 

moo3oo3oo3

Verified Member
is there a method to block incoming abilities ??
(Like AirShield)
Kinda... Air shield uses
Code:
Location origin = player.getLocation();

        FireBlast.removeFireBlastsAroundPoint(origin, radius);
        Combustion.removeAroundPoint(origin, radius);
        WaterManipulation.removeAroundPoint(origin, radius);
        EarthBlast.removeAroundPoint(origin, radius);
 

jedk1

New Member
Can we get a method that blocks bindAbility? Something like Methods.disableBinding(Player player); Methods.allowBinding(Player player);
 

jedk1

New Member
You could just check the top block of your player and make sure it's air and see if it's raining in the world
it requires a little more than that.
1) check the player has nothing above him/her blocking the sky
2) check its raining
3) check the player is in a biome that has rain
 

Finn_Bueno_

Staff member
Plugin Developer
Verified Member
ow ow ow! I got a good one now!
Code:
if(Methods.isUsingAbility(player, ability)){
//Stuff
}
It would be useful to check if someone is using waterspout for example.
 
Top