Block Methods
Designations
data() (required)
CustomBlockData
Example
@Override
public CustomBlockData data() {
return new CustomBlockData(
"test_block",
CustomItemManager.getManager().customItem("block_item").orElse(null)
);
}validate(CustomBlockRuntime) (required)
Example
createBlock(Location, CustomItemRuntime?) (required)
Nullable
Example
beforePlace(CustomItemRuntime?, Player?, Location)
Nullable
Example
placed(CustomItemRuntime?, OfflinePlayer?, CustomBlockRuntime)
Nullable
Destroy and destroyRequest
destroyRequest(CustomBlockRuntime)
destroy(CustomBlockBreakContext)
CustomBlockBreakContext
Left and right click
rightClicked(CustomBlockRuntime, PlayerInteractEvent)
leftClicked(CustomBlockRuntime, PlayerInteractEvent)
blockDestroyProgress(CustomBlockRuntime, BlockBreakProgressUpdateEvent)
Last updated