Advertisement
Guest User

Untitled

a guest
Oct 10th, 2015
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.20 KB | None | 0 0
  1. package me.thepureanarchy;
  2.  
  3. import org.bukkit.command.Command;
  4. import org.bukkit.command.CommandSender;
  5. import org.bukkit.entity.Player;
  6. import org.bukkit.plugin.java.JavaPlugin;
  7. import org.bukkit.potion.PotionEffect;
  8. import org.bukkit.potion.PotionEffectType;
  9.  
  10. public class gapplecmd extends JavaPlugin {
  11.  
  12. @Override
  13. public void onEnable () {
  14. getLogger().info("Plugin successfully loaded!");
  15. }
  16.  
  17. @Override
  18. public void onDisable() {
  19.  
  20. }
  21.  
  22. public boolean onCommand(CommandSender sender, Command cmd, String laber, String[]args) {
  23.  
  24. if (cmd.getName().equalsIgnoreCase("gapple") && sender instanceof Player) {
  25.  
  26. Player player = (Player) sender;
  27.  
  28. player.addPotionEffect(new PotionEffect(PotionEffectType.ABSORPTION, 2400, 1));
  29. player.addPotionEffect(new PotionEffect(PotionEffectType.REGENERATION, 600, 5 ));
  30. player.addPotionEffect(new PotionEffect(PotionEffectType.FIRE_RESISTANCE, 6000, 1));
  31. player.addPotionEffect(new PotionEffect(PotionEffectType.DAMAGE_RESISTANCE, 6000, 1));
  32. player.sendMessage("Gapple Effect Successfully Activated for" + player.getName());
  33.  
  34. return true;
  35.  
  36. }
  37. return false;
  38.  
  39. }
  40.  
  41. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement