Represents a captured state of a block, which will not change
automatically.

Unlike Block, which only one object can exist per coordinate, BlockState
can exist multiple times for any given Block. Note that another plugin may
change the state of the block and you will not know, or they may change the
block to another type entirely, causing your BlockState to become invalid.

setTypeId

update

boolean update()

Attempts to update the block represented by this state, setting it to
the new values as defined by this state.

This has the same effect as calling update(false). That is to say,
this will not modify the state of a block if it is no longer the same
type as it was when this state was taken. It will return false in this
eventuality.