diff --git a/Changelog.txt b/Changelog.txt index 5ad1aaab3..eb24d9d8f 100644 --- a/Changelog.txt +++ b/Changelog.txt @@ -9,6 +9,7 @@ Key: Version 1.3.09 = Fixed issue with NoCheatPlus and Serrated Strikes / Skull Splitter (fight.noswing) + = Fixed bug where you could receive Archery XP from Potions ! Changed Spout settings to be in their own config file (spout.yml) Version 1.3.08 diff --git a/src/main/java/com/gmail/nossr50/util/Combat.java b/src/main/java/com/gmail/nossr50/util/Combat.java index 250985344..9f302b818 100644 --- a/src/main/java/com/gmail/nossr50/util/Combat.java +++ b/src/main/java/com/gmail/nossr50/util/Combat.java @@ -3,6 +3,7 @@ package com.gmail.nossr50.util; import org.bukkit.Material; import org.bukkit.entity.AnimalTamer; import org.bukkit.entity.Animals; +import org.bukkit.entity.Arrow; import org.bukkit.entity.Entity; import org.bukkit.entity.EntityType; import org.bukkit.entity.IronGolem; @@ -186,14 +187,14 @@ public class Combat { } } } - else if (damager instanceof Projectile) { - if (!configInstance.getArcheryPVP() && ((Projectile) damager).getShooter().getType().equals(EntityType.PLAYER)) { + else if (damager instanceof Arrow) { + if (!configInstance.getArcheryPVP() && ((Arrow) damager).getShooter().getType().equals(EntityType.PLAYER)) { if (targetIsPlayer || targetIsTamedPet) { return; } } - if (!configInstance.getArcheryPVE() && !((Projectile) damager).getShooter().getType().equals(EntityType.PLAYER)) { + if (!configInstance.getArcheryPVE() && !((Arrow) damager).getShooter().getType().equals(EntityType.PLAYER)) { if (!targetIsPlayer || !targetIsTamedPet) { return; }