Answers for "bukkit detect block that nowbal hit"

0

bukkit detect block that nowbal hit

((CraftPlayer)player).getHandle().netServerHandler.sendPacket(new Packet55BlockBreakAnimation(params));
Posted by: Guest on July-27-2020
0

bukkit detect block that nowbal hit

public void onProjectileHit(ProjectileHitEvent event) {
        Entity entity = event.getEntity();
        if (entity instanceof Snowball) {
            Location loc = entity.getLocation();
            Vector vec = entity.getVelocity();
            Location loc2 = new Location(loc.getWorld(), loc.getX()+vec.getX(), loc.getY()+vec.getY(), loc.getZ()+vec.getZ());
            System.out.println(loc2.getBlock().getTypeId());
            if (loc2.getBlock().getTypeId()==Block.SNOW_BLOCK.id)
            {
...
Posted by: Guest on July-27-2020

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language