A paper library to aid in manually ticking block breaking
Tested with paper 1.18.2, requires ProtocolLib v4.7.0
For questions, add me on discord U9G#0670
- Clone this repo locally
- run the publishToMavenLocal action
- (for gradle only) in the repositories of your own plugin, add mavenLocal() below mavenCentral()
- Then add it to the dependencies section of maven/gradle
implementation 'com.github.u9g:betterblockbreaking:1.0-SNAPSHOT'
<dependency>
<groupId>com.github.u9g</groupId>
<artifactId>betterblockbreaking</artifactId>
<version>1.0-SNAPSHOT</version>
<scope>compile</scope>
</dependency>
- add to your plugin.yml the line
depend: [ProtocolLib]
(and have ProtocolLib in the plugins folder of your server)
- In the onEnable method of your plugin, add the line:
BlockBreakManager blockBreakManager = new BlockBreakManager(this, numberOfBlocksToKeepBreakProgressPerPlayer);
When a player breaks a block, you can cancel the block break (don't actually break the block), change the type of block that will be put here after.
Allows you to cancel digging the block (not show break progress) or change the tickSize (allows you to get finite control over how fast or slow the blocks break)