Recent Discussions

Prevent instamining of a claimed block using Paper API

Open in Discord
Unanswered
Kromfohrländer posted this in #questions
25 messages
0 views
KromfohrländerOP
Making my own claim land plugin, and the concept behind it is that every block should take the same amount of time to mine. The way I'm doing this is detecting the on block damage event and replacing with a reinforced deepslate, on break of the reinforced deepslate drop the original block as normal. However for some reason when instamining, the block damage event fires (inconsistently) after the block break event.

I've gotten around this by doing an every tick loop, checking if the player is looking at a block within a claim, then setting their block break speed attribute to 0, then whenever the block damage event is detected set it back to normal. However this isn't really a great solution and is super taxing as it runs on every tick checking the targetted block of all players on the server.
@Cubicake (Reply ping on) have you heard of #development lol
KromfohrländerOP
Yeah but why would I do that there
This is a question
And questions go in questions.
lol
Ainnoway
sorry i confused it with the instabreak flag in the block damage event
😭
me resharted
just prevent the block damage event aswell
you should really be doing that anyway
KromfohrländerOP
Found another method, I'll share in a sec
Original message was deleted
KromfohrländerOP
interesting claim system
@Preva1l interesting claim system
KromfohrländerOP
P much to allow raiding without allowing raiding
Only allows breaking when player is online
But there's a 10 min cool down, so if u break 1 block in their claim then they log out you can continue for 10 mins
Owners are notified of such raids
You're gonna see an SMP with this plugin very soon
🤫
Loading...