• 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

Tutorial: How to create an ability in ProjectKorra

Coolade

Staff member
Plugin Developer
Verified Member
So, I'm fairly new to this, but I was looking for some help as to how to make blocks appear and disappear, such as the Torrent Wall move that pushes entities away for Waterbending. I'm trying to create a move called WaterExplosion, which is supposed to kinda of create a wall almost like the same move, but cause damage and have a slightly different animation and speed. Anyway you could help?
You should refer to the advanced ability tutorial written by @jedk1
http://projectkorra.com/threads/tutorial-how-to-make-an-advanced-move.714/#post-7571
 

owlcool

Verified Member
This seems good, but I am having problems installing jdk on my 32 bit computer(already installed eclipse on my 64 bit laptop) Ok. WHY CAN'T THE 36 BIT ONE JUST BE CALLED 36 AND NOT 86!!!! CONFUSION AHOY!!!!! Anyways, got the jdk, just waiting for it to update java and configure stuff and stuff like that.
 

owlcool

Verified Member
Well I got my laptop back, I decided that computer was too crappy to get the jdk thing working on it, so I am working on my laptop now. WHY ARE THE BUKKIT LEGAL ISSUES STILL A THING?!?!?
 
Last edited:

AlexTheCoder

Staff member
Plugin Developer
Verified Member
Well I got my laptop back, I decided that computer was too crappy to get the jdk thing working on it, so I am working on my laptop now. WHY ARE THE BUKKIT LEGAL ISSUES STILL A THING?!?!?
Use spigot 1.8 or the bukkit/craftbukkit 1.8 they released. ProjectKorra requires 1.8.
 

Moopy

Verified Member
Hi, I encountered an error while doing this tutorial. I use IntelliJIDEA opposed to Eclipse.

Here is the error:

Here is the path.yml code:

main-class: me.Moopy.korra.abilities.IgniteInformation

The IgniteInformation:
package me.Moopy.korra.abilities;

import com.projectkorra.ProjectKorra.ProjectKorra;
import com.projectkorra.ProjectKorra.Ability.AbilityModule;
import com.projectkorra.ProjectKorra.Element;

public class IgniteInformation extends AbilityModule {

/*
* This registers the ability with the AbilityModule class. It is important
* that the string is EXACTLY how you want the ability to appear in-game.
*/
public IgniteInformation() {
super("Ignite");
}

/*
* This returns the Description that will be seen when someone does /bending
* help [YourAbilityName]
*/
public String getDescription() {
return "Left click an enemy and they will instantly burst into flames.";
}

/*
* This returns the name of the Author of the Ability. Use your own username
* if it is your own project. This will be used for debugging.
*/
public String getAuthor() {
return "Coolade";
}

/*
* Much like the getAuthor(), mainly used for Debugging. Also allows you to
* sort of set a release pattern for your ability.
*/
public String getVersion() {
return "v1.0.0";
}

/*
* Returns the element as a string. It is important you use the Element
* class here. If you do not specify an element, the ability will NOT load
* properly.
*/
public String getElement() {
return Element.Fire.toString();
}

/*
* This just checks whether or not it is a sneak ability. Reason is, some
* other abilities wont work if you are sneaking, so this is our simple
* check for it.
*/
public boolean isShiftAbility() {
return false;
}

/*
* This method is ran each and every time the ability loads. So if you need
* to register any events, schedule any tasks, this is where you do it.
*/
public void onThisLoad() {
ProjectKorra.plugin.getServer().getPluginManager()
.registerEvents(new IgniteListener(), ProjectKorra.plugin);
}

/*
* Stops any progressing Bending.
*/
public void stop() {

}
}

IgniteListener
package me.Moopy.korra.abilities;

import com.projectkorra.ProjectKorra.Methods;
import org.bukkit.entity.Entity;
import org.bukkit.entity.LivingEntity;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
import org.bukkit.event.Listener;
import org.bukkit.event.player.PlayerAnimationEvent;

import java.util.ArrayList;

public class IgniteListener implements Listener {
@EventHandler(priority = EventPriority.NORMAL)
public void onLeftClick(PlayerAnimationEvent event) {
Player player = event.getPlayer();
String ability = Methods.getBoundAbility(player);

if (ability == null || !ability.equalsIgnoreCase("Ignite"))
return;

if(!Methods.canBend(player.getName(), "Ignite"))
return;

if(Methods.isRegionProtectedFromBuild(player, "Ignite", player.getLocation()))
return;

Entity target = Methods.getTargetedEntity(player, 10, new ArrayList<Entity>());
if (target == null)
return;

if(!(target instanceof LivingEntity))
return;

LivingEntity livingTarget = (LivingEntity) target;
livingTarget.setFireTicks(100);
}
}

Here's a picture of my layouty stuff\
upload_2015-1-13_9-48-58.png[/SPOILER

Another weird thing I've found, is that the Ignite.jar is around 6 000 kb in size.

Welp, hope you can help, sorry if I wasn't very clear.
 

Moopy

Verified Member
OK, I found the problem; I wasn't exporting my project properly. I am currently in the process of tracking down tutorials that teach me how to do this in IntelliJ IDEA.
 

Theavatarteam

Verified Member
this is the error
51 [ERROR] Could not load 'plugins\Sendme.jar' in folder 'plugins'
17:16:51 org.bukkit.plugin.InvalidDescriptionException: Invalid plugin.yml
17:16:51 at org.bukkit.plugin.java.JavaPluginLoader.getPluginDescription(JavaPluginLoader.java:150) ~[craftbukkit-1.8-R0.1-SNAPSHOT.jar:git-Bukkit-"24557bc"]
17:16:51 at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:133) [craftbukkit-1.8-R0.1-SNAPSHOT.jar:git-Bukkit-"24557bc"]
17:16:51 at org.bukkit.craftbukkit.v1_8_R1.CraftServer.loadPlugins(CraftServer.java:286) [craftbukkit-1.8-R0.1-SNAPSHOT.jar:git-Bukkit-"24557bc"]
17:16:51 at org.bukkit.craftbukkit.v1_8_R1.CraftServer.<init>(CraftServer.java:248) [craftbukkit-1.8-R0.1-SNAPSHOT.jar:git-Bukkit-"24557bc"]
17:16:51 at net.minecraft.server.v1_8_R1.PlayerList.<init>(PlayerList.java:68) [craftbukkit-1.8-R0.1-SNAPSHOT.jar:git-Bukkit-"24557bc"]
17:16:51 at net.minecraft.server.v1_8_R1.DedicatedPlayerList.<init>(SourceFile:14) [craftbukkit-1.8-R0.1-SNAPSHOT.jar:git-Bukkit-"24557bc"]
17:16:51 at net.minecraft.server.v1_8_R1.DedicatedServer.init(DedicatedServer.java:133) [craftbukkit-1.8-R0.1-SNAPSHOT.jar:git-Bukkit-"24557bc"]
17:16:51 at net.minecraft.server.v1_8_R1.MinecraftServer.run(MinecraftServer.java:475) [craftbukkit-1.8-R0.1-SNAPSHOT.jar:git-Bukkit-"24557bc"]
17:16:51 at java.lang.Thread.run(Unknown Source) [?:1.8.0_31]
17:16:51 Caused by: java.io.FileNotFoundException: Jar does not contain plugin.yml
 

Finn_Bueno_

Staff member
Plugin Developer
Verified Member
ok, im just saying it doesnt work like his video about making a bukkit plugin so he could add a solution to that
The video is not about making an ability. It's to explain some stuff, that you should know before making an ability.
 
Top