There is an important thing I need to tell any developer making an addon ability! If you wish to make your ability enabled by default for any air/fire/water/earth bender (depending on the element you choose for your ability), then you will need to do a few extra things!
Firstly, you will need to create a permission, either in a separate class file (recommended) or in any class file you currently have! All you need to do is add the line:
to any class file!
Once that is done, there is some more you need to do. First, you need to modify your onThisLoad().
You just need to add these two lines to it!
Finally, you need to modify your stop()! Add this one line:
AAAND YOUR DONE
Firstly, you will need to create a permission, either in a separate class file (recommended) or in any class file you currently have! All you need to do is add the line:
Code:
public Permission yourPermName = new Permission("bending.ability.AbiltiyName");
Once that is done, there is some more you need to do. First, you need to modify your onThisLoad().
You just need to add these two lines to it!
Code:
ProjectKorra.plugin.getServer().getPluginManager().addPermission(new yourPermissionsClassName().yourPermissionName);
ProjectKorra.plugin.getServer().getPluginManager().getPermission("bending.ability.AbilityName").setDefault(PermissionDefault.TRUE);
Code:
ProjectKorra.plugin.getServer().getPluginManager().removePermission(new YourPermissionsCLass().yourPermissionName);