Advertisement
Guest User

Untitled

a guest
Nov 11th, 2019
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.59 KB | None | 0 0
  1. package me.bukkit.ColdFireStuds;
  2.  
  3. import org.bukkit.command.Command;
  4. import org.bukkit.command.CommandExecutor;
  5. import org.bukkit.command.CommandSender;
  6. import org.bukkit.entity.Player;
  7. import org.bukkit.potion.PotionEffect;
  8. import org.bukkit.potion.PotionEffectType;
  9.  
  10. public class Effects implements CommandExecutor {
  11. public Effects(Main main) {
  12. // TODO Auto-generated constructor stub
  13. }
  14.  
  15. public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
  16. if(command.getName().equalsIgnoreCase("Speed")) {
  17. if(sender instanceof Player) {
  18. Player player = (Player) sender;
  19. if (player.hasPermission("pvpe.speed") == true);
  20. try { player.addPotionEffect(new PotionEffect(PotionEffectType.SPEED, 200, 1));
  21. if(command.getName().equalsIgnoreCase("Absorb")) {
  22. if (player.hasPermission("pvpe.absorb") == true);
  23. try { player.addPotionEffect(new PotionEffect(PotionEffectType.ABSORPTION, 200, 1));
  24. if (command.getName().equalsIgnoreCase("Invis")) {
  25. if (player.hasPermission("pvpe.invis") == true);
  26. try { player.addPotionEffect(new PotionEffect(PotionEffectType.INVISIBILITY, 200, 1));
  27. if (command.getName().equalsIgnoreCase("Health")) {
  28. if (player.hasPermission("pvpe.health") == true);
  29. try { player.getPotionEffect(PotionEffectType.HEALTH_BOOST);
  30. if (command.getName().equalsIgnoreCase("saturate")) {
  31. if (player.hasPermission("pvpe.saturate") == true);
  32. try { player.addPotionEffect(new PotionEffect(PotionEffectType.HEALTH_BOOST, 200, 1));
  33.  
  34. }finally {
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement