Advertisement
Guest User

Untitled

a guest
Oct 1st, 2014
196
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.74 KB | None | 0 0
  1. package AirPunch.korra.abilities;
  2.  
  3. import org.bukkit.permissions.PermissionDefault;
  4.  
  5. import com.projectkorra.ProjectKorra.ProjectKorra;
  6. import com.projectkorra.ProjectKorra.Ability.AbilityModule;
  7. import com.projectkorra.ProjectKorra.Element;
  8.  
  9. public class AirPunchInformation extends AbilityModule {
  10.  
  11.     public AirPunchInformation() {
  12.         super("AirPunch");
  13.     }
  14.  
  15.     public String getDescription() {
  16.         return "Left Click to shoot a punch of air, pushing back and damaging your enemy.";
  17.     }
  18.  
  19.     public String getAuthor() {
  20.         return "xXturbokidXx";
  21.     }
  22.  
  23.     public String getVersion() {
  24.         return "v1.0.0";
  25.     }
  26.  
  27.     public String getElement() {
  28.         return Element.Air.toString();
  29.     }
  30.  
  31.     public boolean isShiftAbility() {
  32.         return false;
  33.     }
  34.  
  35.     public void onThisLoad() {
  36.         ProjectKorra.plugin.getLogger().info("Discharge developed by jedk1 has been loaded!");
  37.         ProjectKorra.plugin.getServer().getPluginManager().registerEvents(new AirPunchListener(), ProjectKorra.plugin);
  38.        
  39.         //Register permissions here, they will be set to default every time the move is loaded.
  40.         ProjectKorra.plugin.getServer().getPluginManager().addPermission(new AirPunchPermissions().airpunchDefault);
  41.         //Here you would replace 'bending.ability.Discharge' with 'bending.ability.[Your Ability]'.
  42.         ProjectKorra.plugin.getServer().getPluginManager().getPermission("bending.ability.AirPunch").setDefault(PermissionDefault.TRUE);
  43.     }
  44.  
  45.     public void stop() {
  46.         //Unregister the permission, this stop it from breaking next time you start the server up. After all, you don't want the player having 100000 permission nodes of
  47.         //"bending.ability.[Your Ability]" now do you?
  48.         ProjectKorra.plugin.getServer().getPluginManager().removePermission(new AirPunchPermissions().AirPunchDefault);
  49.     }
  50. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement