1
0
mirror of https://github.com/Zrips/Jobs.git synced 2025-01-04 23:37:49 +01:00

Stripping logs are respected as block place actions #945

Fixes #940
This commit is contained in:
montlikadani 2020-10-06 18:05:02 +02:00 committed by GitHub
commit 3652fe5d1b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -423,6 +423,10 @@ public class JobsPaymentListener implements Listener {
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
public void onBlockPlace(BlockPlaceEvent event) {
// A tool should not trigger a BlockPlaceEvent (fixes stripping logs bug #940)
if (CMIMaterial.get(event.getItemInHand().getType()).isTool())
return;
Block block = event.getBlock();
//disabling plugin in world