publicclassExecutableBlocksAPI { /** * Get the ExecutableBlocks Manager, * It allows you to get / retrieve the ExecutableBlocks Configurations **/publicstaticExecutableBlocksManagergetExecutableBlocksManager() {returnExecutableBlocksManager.getInstance(); } /** * Get the ExecutableBlocksPlaced Manager, * It allows you to get / retrieve the ExecutableBlocks Placed **/publicstaticExecutableBlocksPlacedManagergetExecutableBlocksPlacedManager() {returnExecutableBlocksPlacedManager.getInstance(); } /** * Get the ExecutableBlockObject * It allows you to get / retrieve the ExecutableBlocks Configurations under its item form **/publicstaticExecutableBlockObjectgetExecutableBlockObject(ItemStack itemStack) {returnnewExecutableBlockObject(itemStack); }}
The static method to have access to the managers of the ExecutableBlocks and the ExecutableBlockPlaced.
Examples
/** Example you decide to support ExecutableBlocks in world generation plugin **/publicvoidplaceExecutableBlock(String executableBlockId,Location location){Optional<ExecutableBlock> ebOpt =ExecutableBlocksAPI.getExecutableBlocksManager().getExecutableBlock(executableBlockId);ebOpt.ifPresent(executableBlock ->executableBlock.place(location,true,OverrideEBP.REMOVE_EXISTING_EBP,null,null,null));}