mirror of
https://github.com/Zrips/Jobs.git
synced 2024-11-29 22:13:25 +01:00
Prevent players from being getting more money from beehives while sneaking
This commit is contained in:
parent
c80d12f167
commit
afef2dc927
@ -1631,7 +1631,7 @@ public class JobsPaymentListener implements Listener {
|
||||
}
|
||||
|
||||
if (Version.isCurrentEqualOrHigher(Version.v1_15_R1) && !event.useInteractedBlock().equals(org.bukkit.event.Event.Result.DENY)
|
||||
&& event.getAction() == Action.RIGHT_CLICK_BLOCK) {
|
||||
&& event.getAction() == Action.RIGHT_CLICK_BLOCK && !p.isSneaking()) {
|
||||
if (jPlayer != null && cmat.equals(CMIMaterial.BEEHIVE) || cmat.equals(CMIMaterial.BEE_NEST)) {
|
||||
org.bukkit.block.data.type.Beehive beehive = (org.bukkit.block.data.type.Beehive) block.getBlockData();
|
||||
if (beehive.getHoneyLevel() == beehive.getMaximumHoneyLevel() && (hand.equals(CMIMaterial.SHEARS.getMaterial())
|
||||
|
Loading…
Reference in New Issue
Block a user