diff --git a/Changelog.txt b/Changelog.txt
index 45966f184..999d37e29 100644
--- a/Changelog.txt
+++ b/Changelog.txt
@@ -1,17 +1,20 @@
Version 2.1.95
Added missing Chorus_Fruit & Chorus_Plant entries to Herbalism's Bonus Drops in config.yml (See notes)
- Added 'Carrots, Cocoa, Potatoes, Wheat, Beetroots, Nether_Wart' to Herbalism in experience.yml (See notes)
Fixed a bug preventing Wandering Traders from granting XP
Fixed a bug that prevented Chorus Tree's from giving full XP if you broke anything other than the bottom block
Fixed a bug which could cause Large Fern's to reward less XP
Fixed a bug where certain herbalism crops could have fewer than intended bonus drops
- Added missing 'Chorus_Flower' entry to herbalism in experience.yml (update your config manually or delete the file to regenerate it)
+ Fixed a bug involving Ender Pearl and Acrobatics
+ Added 'Carrots, Cocoa, Potatoes, Wheat, Beetroots, Nether_Wart' to Herbalism in experience.yml (See notes)
+ Removed the _Ripe entries from experience.yml (no longer used)
+ Added missing 'Chorus_Flower' entry to herbalism in experience.yml
Added some debug messages about XP gains if you are in debug mode
Added some debug messages for Acrobatics if you are in debug mode
+ Added some debug messages for Herbalism if you are in debug mode
NOTES:
Add 'Chorus_Fruit' and 'Chorus_Plant' under Bonus_Drops.Herbalism in config.yml or you will not be getting double drops for Chorus Fruit.
- You shouldn't need to add "Carrots, Cocoa, Potatoes, Wheat, Beetroots, Nether_Wart" to your experience file, it seems that file updates automatically for missing entries.
+ You shouldn't need to add "Chorus_Flower, Carrots, Cocoa, Potatoes, Wheat, Beetroots, Nether_Wart" to your experience file, it seems that config file updates automatically for missing entries.
Version 2.1.94
2 new devs have joined the mcMMO team (electronicboy, kashike), bringing the active dev team to 3 including myself! Strings relating to authors of mcMMO have been updated to reflect this
diff --git a/pom.xml b/pom.xml
index b19bd57e9..f21720654 100755
--- a/pom.xml
+++ b/pom.xml
@@ -2,7 +2,7 @@
4.0.0
com.gmail.nossr50.mcMMO
mcMMO
- 2.1.95-SNAPSHOT
+ 2.1.95
mcMMO
https://github.com/mcMMO-Dev/mcMMO
diff --git a/src/main/java/com/gmail/nossr50/datatypes/skills/subskills/acrobatics/Roll.java b/src/main/java/com/gmail/nossr50/datatypes/skills/subskills/acrobatics/Roll.java
index 78534523f..2f9a76f95 100644
--- a/src/main/java/com/gmail/nossr50/datatypes/skills/subskills/acrobatics/Roll.java
+++ b/src/main/java/com/gmail/nossr50/datatypes/skills/subskills/acrobatics/Roll.java
@@ -10,6 +10,7 @@ import com.gmail.nossr50.datatypes.skills.SubSkillType;
import com.gmail.nossr50.locale.LocaleLoader;
import com.gmail.nossr50.mcMMO;
import com.gmail.nossr50.util.EventUtils;
+import com.gmail.nossr50.util.ItemUtils;
import com.gmail.nossr50.util.Permissions;
import com.gmail.nossr50.util.player.NotificationManager;
import com.gmail.nossr50.util.player.UserManager;
@@ -276,7 +277,7 @@ public class Roll extends AcrobaticsSubSkill {
McMMOPlayer mcMMOPlayer = UserManager.getPlayer(player);
- if (player.getInventory().getItemInMainHand().getType() == Material.ENDER_PEARL || player.isInsideVehicle()) {
+ if (ItemUtils.hasItemInEitherHand(player, Material.ENDER_PEARL) || player.isInsideVehicle()) {
if(mcMMOPlayer.isDebugMode()) {
mcMMOPlayer.getPlayer().sendMessage("Acrobatics XP Prevented: Ender Pearl or Inside Vehicle");
}
diff --git a/src/main/java/com/gmail/nossr50/listeners/EntityListener.java b/src/main/java/com/gmail/nossr50/listeners/EntityListener.java
index ec004949a..101b5868d 100644
--- a/src/main/java/com/gmail/nossr50/listeners/EntityListener.java
+++ b/src/main/java/com/gmail/nossr50/listeners/EntityListener.java
@@ -72,8 +72,6 @@ public class EntityListener implements Listener {
if(!ExperienceConfig.getInstance().isEndermanEndermiteFarmingPrevented())
return;
- if(event.getReason() == EntityTargetEvent.TargetReason.TEMPT)
-
//It's rare but targets can be null sometimes
if(event.getTarget() == null)
{
@@ -83,7 +81,7 @@ public class EntityListener implements Listener {
//Prevent entities from giving XP if they target endermite
if(event.getTarget() instanceof Endermite)
{
- if(event.getEntity().getMetadata(mcMMO.entityMetadataKey) == null || event.getEntity().getMetadata(mcMMO.entityMetadataKey).size() <= 0)
+ if(event.getEntity().hasMetadata(mcMMO.entityMetadataKey))
event.getEntity().setMetadata(mcMMO.entityMetadataKey, mcMMO.metadataValue);
}
}
@@ -189,6 +187,7 @@ public class EntityListener implements Listener {
if (mcMMO.getPlaceStore().isTrue(block) && !isTracked) {
mcMMO.getPlaceStore().setFalse(block);
+
entity.setMetadata(mcMMO.entityMetadataKey, mcMMO.metadataValue);
}
else if (isTracked) {
diff --git a/src/main/java/com/gmail/nossr50/util/BlockUtils.java b/src/main/java/com/gmail/nossr50/util/BlockUtils.java
index ec01ea444..2d6b47343 100644
--- a/src/main/java/com/gmail/nossr50/util/BlockUtils.java
+++ b/src/main/java/com/gmail/nossr50/util/BlockUtils.java
@@ -11,7 +11,6 @@ import com.gmail.nossr50.skills.salvage.Salvage;
import com.gmail.nossr50.util.random.RandomChanceSkill;
import com.gmail.nossr50.util.random.RandomChanceUtil;
import org.bukkit.Material;
-import org.bukkit.block.BlockFace;
import org.bukkit.block.BlockState;
import org.bukkit.block.data.Ageable;
import org.bukkit.block.data.BlockData;
diff --git a/src/main/java/com/gmail/nossr50/util/ItemUtils.java b/src/main/java/com/gmail/nossr50/util/ItemUtils.java
index ca1aff840..a635f3155 100644
--- a/src/main/java/com/gmail/nossr50/util/ItemUtils.java
+++ b/src/main/java/com/gmail/nossr50/util/ItemUtils.java
@@ -6,6 +6,7 @@ import com.gmail.nossr50.locale.LocaleLoader;
import com.gmail.nossr50.mcMMO;
import org.bukkit.ChatColor;
import org.bukkit.Material;
+import org.bukkit.entity.Player;
import org.bukkit.inventory.FurnaceRecipe;
import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.Recipe;
@@ -32,6 +33,10 @@ public final class ItemUtils {
}
}
+ public static boolean hasItemInEitherHand(Player player, Material material) {
+ return player.getInventory().getItemInMainHand().getType() == material || player.getInventory().getItemInOffHand().getType() == material;
+ }
+
/**
* Checks if the item is a sword.
*