Solved FallingBlock event called

Discussion in 'Spigot Plugin Development' started by nbdSteve, Apr 27, 2020.

  1. Hey, does anyone know what event is called when a falling block hits the ground and is placed?
     
  2. You could use an Entity Move Event and then check to see if the falling block entity is on the ground, and if it is, remove the entity (if you're wanting to remove the block). Not sure if that's the most efficient way to solve your issue, but it's an option I guess.
     
    • Useful Useful x 1
  3. I use this:

    Code (Java):
    @EventHandler(priority=EventPriority.LOWEST)
        public void onFallingBlockLand(EntityChangeBlockEvent event) {
            Entity ent = event.getEntity();
            if (event.getEntityType() == EntityType.FALLING_BLOCK) {
                //Do stuff
            }
        }
     
    • Agree Agree x 1
  4. Thanks, that worked. It turned out that it was a problem with the Spigot jar I was using - for some reason it doesn't call that event. Anyway I switch to default spigot and it works now.
     
    • Like Like x 1
    • Friendly Friendly x 1
  5. Mark this thread as solved so others know.