From 822b0f32d5be3d08be7bbdbae4fea20dbeec5c17 Mon Sep 17 00:00:00 2001 From: HappyPikachu Date: Wed, 18 Feb 2015 14:12:58 -0500 Subject: [PATCH] Revert building against Spigot, suppress getShooter() warning --- pom.xml | 6 ------ src/main/java/me/blackvein/quests/PlayerListener.java | 8 ++++++-- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/pom.xml b/pom.xml index 3f92497de..8aeaca361 100644 --- a/pom.xml +++ b/pom.xml @@ -29,12 +29,6 @@ system ${project.basedir}/lib/craftbukkit-1.8.jar - - org.bukkit - bukkit - 1.8-R0.1-SNAPSHOT - provided - org.bukkit craftbukkit1 diff --git a/src/main/java/me/blackvein/quests/PlayerListener.java b/src/main/java/me/blackvein/quests/PlayerListener.java index cdb25d35c..59fed4ac5 100644 --- a/src/main/java/me/blackvein/quests/PlayerListener.java +++ b/src/main/java/me/blackvein/quests/PlayerListener.java @@ -2,11 +2,14 @@ package me.blackvein.quests; import com.sk89q.worldguard.protection.managers.RegionManager; import com.sk89q.worldguard.protection.regions.ProtectedRegion; + import java.io.File; import java.util.Iterator; + import me.blackvein.quests.util.ItemUtil; import me.blackvein.quests.util.Lang; import net.citizensnpcs.api.CitizensAPI; + import org.bukkit.ChatColor; import org.bukkit.Location; import org.bukkit.Material; @@ -575,9 +578,10 @@ public class PlayerListener implements Listener, ColorUtil { if (damager instanceof Projectile) { Projectile projectile = (Projectile)damager; - ProjectileSource source = projectile.getShooter(); + @SuppressWarnings("deprecation") + ProjectileSource source = projectile.getShooter(); - if(source instanceof Player) { + if (source instanceof Player) { Player player = (Player) source; boolean okay = true;