This has to be Arrow to keep Potions from giving XP.

This commit is contained in:
GJ 2012-05-24 15:26:01 -04:00
parent eb2ec71d2b
commit 35d4914518
2 changed files with 5 additions and 3 deletions

View File

@ -9,6 +9,7 @@ Key:
Version 1.3.09 Version 1.3.09
= Fixed issue with NoCheatPlus and Serrated Strikes / Skull Splitter (fight.noswing) = 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) ! Changed Spout settings to be in their own config file (spout.yml)
Version 1.3.08 Version 1.3.08

View File

@ -3,6 +3,7 @@ package com.gmail.nossr50.util;
import org.bukkit.Material; import org.bukkit.Material;
import org.bukkit.entity.AnimalTamer; import org.bukkit.entity.AnimalTamer;
import org.bukkit.entity.Animals; import org.bukkit.entity.Animals;
import org.bukkit.entity.Arrow;
import org.bukkit.entity.Entity; import org.bukkit.entity.Entity;
import org.bukkit.entity.EntityType; import org.bukkit.entity.EntityType;
import org.bukkit.entity.IronGolem; import org.bukkit.entity.IronGolem;
@ -186,14 +187,14 @@ public class Combat {
} }
} }
} }
else if (damager instanceof Projectile) { else if (damager instanceof Arrow) {
if (!configInstance.getArcheryPVP() && ((Projectile) damager).getShooter().getType().equals(EntityType.PLAYER)) { if (!configInstance.getArcheryPVP() && ((Arrow) damager).getShooter().getType().equals(EntityType.PLAYER)) {
if (targetIsPlayer || targetIsTamedPet) { if (targetIsPlayer || targetIsTamedPet) {
return; return;
} }
} }
if (!configInstance.getArcheryPVE() && !((Projectile) damager).getShooter().getType().equals(EntityType.PLAYER)) { if (!configInstance.getArcheryPVE() && !((Arrow) damager).getShooter().getType().equals(EntityType.PLAYER)) {
if (!targetIsPlayer || !targetIsTamedPet) { if (!targetIsPlayer || !targetIsTamedPet) {
return; return;
} }