Advertisement
maxthelinkfan

Untitled

Sep 22nd, 2012
39
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.14 KB | None | 0 0
  1. package me.kyrp.MaxSpeedz;
  2.  
  3. import org.bukkit.entity.Player;
  4. import org.bukkit.event.EventHandler;
  5. import org.bukkit.event.EventPriority;
  6. import org.bukkit.event.Listener;
  7. import org.bukkit.event.block.BlockPlaceEvent;
  8. import org.bukkit.potion.PotionEffect;
  9. import org.bukkit.potion.PotionEffectType;
  10.  
  11. public class Events implements Listener {
  12.  
  13. @EventHandler(priority = EventPriority.NORMAL)
  14. public void onBlockPlace(BlockPlaceEvent event) {
  15. Player player = event.getPlayer();
  16. sender.hasPermission("maxbuild.regen");
  17. player.addPotionEffect(new PotionEffect(PotionEffectType.REGENERATION, 5000, 3));
  18. player.addPotionEffect(new PotionEffect(PotionEffectType.FIRE_RESISTANCE, 5000, 1));
  19. player.addPotionEffect(new PotionEffect(PotionEffectType.DAMAGE_RESISTANCE, 5000, 1));
  20. player.addPotionEffect(new PotionEffect(PotionEffectType.INCREASE_DAMAGE, 5000, 1));
  21. player.addPotionEffect(new PotionEffect(PotionEffectType.WATER_BREATHING, 2000, 1));
  22.  
  23.  
  24.  
  25. }
  26.  
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement