6697

Minecraft exploding sheep

Apr 8th, 2020
491
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. public class sheeplosion implements Listener {
  2.     @EventHandler
  3.     public void onShear(PlayerShearEntityEvent event)
  4.     {
  5.         if(event.getPlayer().hasPermission("ree.troll.sheeplosion")) {
  6.             Player thePlayer = event.getPlayer();
  7.             Entity sheep = event.getEntity();
  8.             LivingEntity livingSheep = (LivingEntity) sheep;
  9.             World world = sheep.getWorld();
  10.             world.createExplosion(sheep.getLocation(), 3);
  11.             livingSheep.setHealth(0);
  12.             econ.withdrawPlayer(thePlayer, 150.0);
  13.         }
  14.         return;
  15.     }
  16. }
RAW Paste Data