Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @EventHandler
- public void ShotArrow(final ProjectileHitEvent bow) {
- if (bow.getEntity() instanceof Arrow) {
- final Arrow arrow = (Arrow)bow.getEntity();
- final org.bukkit.Location al = arrow.getLocation();
- final Entity shooter = (Entity)arrow.getShooter();
- Player p = (Player)shooter;
- p.sendMessage("ok1");
- if (shooter instanceof Player) {
- p.sendMessage("ok2");
- final Block b = bow.getHitBlock();
- if (b.getType() != Material.WOOL) return;
- p.sendMessage("ok3");
- b.setType(Material.AIR);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment