- Compatible API Versions
- 1.0.9+
- Sourcecode
- https://github.com/PetteriM1/BlockAPI
With BlockAPI plugin developers can easily replace blocks with custom ones to change their behaviour
Notice:
- Make sure you are using the latest Nukkit build.
- It is recommended that the new block extends the original block to avoid problems.
- All the plugins that don't use Block.get() won't use the custom blocks.
- There can be only one block per id. If you register two blocks with the same id the first one will be overwritten.
Plugins using BlockAPI:
None yet but hopefully we will get some soon
API methods:
Register a custom block
Register multiple custom blocks
Unregister a custom block
Unregister all custom blocks
Get all registered custom blocks
Enable/disable random tick updates for a block
Maven dependency:
Example plugin:
https://github.com/PetteriM1/BlockAPIExample
Want to support the development of this plugin? Donate via PayPal
Notice:
- Make sure you are using the latest Nukkit build.
- It is recommended that the new block extends the original block to avoid problems.
- All the plugins that don't use Block.get() won't use the custom blocks.
- There can be only one block per id. If you register two blocks with the same id the first one will be overwritten.
Plugins using BlockAPI:
None yet but hopefully we will get some soon
API methods:
Register a custom block
Code:
me.petterim1.blockapi.API.registerBlock(int blockId, Class<? extends Block> blockClass)
Code:
me.petterim1.blockapi.API.registerBlocks(Map<Integer, Class<? extends Block>> blocks)
Code:
me.petterim1.blockapi.API.unregisterBlock(int blockId)
Code:
me.petterim1.blockapi.API.unregisterAll()
Code:
me.petterim1.blockapi.API.getAllCustomBlocks()
Code:
me.petterim1.blockapi.API.setRandomTickingEnabled(int blockId, boolean randomTickingEnabled)
Maven dependency:
Code:
<dependency>
<groupId>me.petterim1.blockapi</groupId>
<artifactId>BlockAPI</artifactId>
<version>1.0.1</version>
<scope>system</scope>
<systemPath>${basedir}/BlockAPI-1.0.1.jar</systemPath>
</dependency>
Example plugin:
https://github.com/PetteriM1/BlockAPIExample
Want to support the development of this plugin? Donate via PayPal