From eaa1a8edcabd356e5765a56a962c29e87bde0ffe Mon Sep 17 00:00:00 2001 From: Dor Date: Sat, 12 Mar 2016 05:31:11 +0200 Subject: [PATCH] Chorus plant experience reward is now 1 instead of 2. Sneaking is required if the player has an item in the off hand and they're not in a vehicle. --- .../java/com/gmail/nossr50/listeners/PlayerListener.java | 8 ++++++++ src/main/resources/experience.yml | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/gmail/nossr50/listeners/PlayerListener.java b/src/main/java/com/gmail/nossr50/listeners/PlayerListener.java index c611dc432..75e76353d 100644 --- a/src/main/java/com/gmail/nossr50/listeners/PlayerListener.java +++ b/src/main/java/com/gmail/nossr50/listeners/PlayerListener.java @@ -528,6 +528,10 @@ public class PlayerListener implements Listener { switch (event.getAction()) { case RIGHT_CLICK_BLOCK: + if(player.getInventory().getItemInOffHand().getType() != Material.AIR && !player.isInsideVehicle() && !player.isSneaking()) { + break; + } + Block block = event.getClickedBlock(); BlockState blockState = block.getState(); @@ -569,6 +573,10 @@ public class PlayerListener implements Listener { break; case RIGHT_CLICK_AIR: + if(player.getInventory().getItemInOffHand().getType() != Material.AIR && !player.isInsideVehicle() && !player.isSneaking()) { + break; + } + /* ACTIVATION CHECKS */ if (Config.getInstance().getAbilitiesEnabled()) { mcMMOPlayer.processAbilityActivation(SkillType.AXES); diff --git a/src/main/resources/experience.yml b/src/main/resources/experience.yml index 90360229b..2b3f42bee 100644 --- a/src/main/resources/experience.yml +++ b/src/main/resources/experience.yml @@ -156,7 +156,7 @@ Experience: Cactus: 30 Carrot: 50 Chorus_Flower: 25 - Chorus_Plant: 2 + Chorus_Plant: 1 Cocoa: 30 Crops: 50 Dead_Bush: 30