Guest User

Untitled

a guest
Feb 17th, 2021
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.68 KB | None | 0 0
  1.     @EventHandler
  2.     public void ShotArrow(final ProjectileHitEvent bow) {
  3.         if (bow.getEntity() instanceof Arrow) {
  4.             final Arrow arrow = (Arrow)bow.getEntity();
  5.             final org.bukkit.Location al = arrow.getLocation();
  6.             final Entity shooter = (Entity)arrow.getShooter();
  7.             Player p = (Player)shooter;
  8.             p.sendMessage("ok1");
  9.             if (shooter instanceof Player) {
  10.                 p.sendMessage("ok2");
  11.                 final Block b = bow.getHitBlock();
  12.                 if (b.getType() != Material.WOOL) return;
  13.                 p.sendMessage("ok3");
  14.                 b.setType(Material.AIR);
  15.             }
  16.         }
  17.     }
Advertisement
Add Comment
Please, Sign In to add comment