“Bukkit Detect Block That Nowbal atingiu” Respostas de código

Bukkit Detect Block That Nowbal atingiu

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)
            {
...
Jealous Jackal

Bukkit Detect Block That Nowbal atingiu

((CraftPlayer)player).getHandle().netServerHandler.sendPacket(new Packet55BlockBreakAnimation(params));
Jealous Jackal

Respostas semelhantes a “Bukkit Detect Block That Nowbal atingiu”

Perguntas semelhantes a “Bukkit Detect Block That Nowbal atingiu”

Procure respostas de código populares por idioma

Procurar outros idiomas de código