Farmland changed to dirt event

Discussion in 'Plugin Development' started by rsod, Aug 14, 2013.

Thread Status:
Not open for further replies.
  1. Offline

    rsod

    Which event is it?
     
  2. Offline

    dunbaratu

    It's not a specific single event. There's multiple events that can cause it.

    One is "EntityChangeBlockEvent" - for when any entity other than a player changes a block (i.e. a monster walks on farmland). (The documentation says it doesn't get triggered when the entity is a player though, and I can't figure out what the player equivalent is).
     
  3. Offline

    flaaghara

    rsod PlayerInteractEvent for a human, EntityInteractEvent for a mob.

    EDIT: My bad, that's only for trampling. If farmland decays to dirt (e.g. there is no water nearby), BlockFadeEvent is called. So you'll have to intercept all three of those events if you want to mess around with that game mechanic.
     
Thread Status:
Not open for further replies.

Share This Page