EntityMoveEvent with bkcommonlib (FallingSand)

Discussion in 'Spigot Plugin Development' started by redstonebiten, May 18, 2016.

Thread Status:
Not open for further replies.
  1. So what i'm trying to do is: When a sand goes above sky limit it should die/remove or whatever.. but how do i do this with bkcommonlib?
    Code (Text):
        @EventHandler
        public void Sky(EntityMoveEvent event){
            Entity entity = (Entity) event.getEntity();
            if(entity instanceof FallingBlock){
                if(entity.getLocation().getBlockY() >= 255){
                    entity.remove();
                }
            }
        }
    }
     
Thread Status:
Not open for further replies.