1
0
mirror of https://github.com/Zrips/Jobs.git synced 2025-01-16 05:01:34 +01:00

Merge pull request #1584 from FireML/farmland-payment

Allow payment for tilling dirt
This commit is contained in:
Zrips 2023-04-21 13:59:11 +03:00 committed by GitHub
commit 95e8b3b208
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -485,7 +485,8 @@ public final class JobsPaymentListener implements Listener {
return;
// A tool should not trigger a BlockPlaceEvent (fixes stripping logs bug #940)
if (CMIMaterial.get(event.getItemInHand().getType()).isTool())
// Allow this to trigger with a hoe so players can get paid for farmland.
if (CMIMaterial.get(event.getItemInHand().getType()).isTool() && !event.getItemInHand().getType().toString().endsWith("_HOE"))
return;
Block block = event.getBlock();