From 8f8d1756098c2d2fe7c942a308b226a112bc4049 Mon Sep 17 00:00:00 2001 From: alisolarflare Date: Thu, 22 Dec 2016 04:37:36 -0500 Subject: [PATCH] Removed NMS because of build errors --- pom.xml | 2 +- .../components/magic/tricks/CannonBowListener.java | 11 ++--------- 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/pom.xml b/pom.xml index d21b76e..ab68ed4 100644 --- a/pom.xml +++ b/pom.xml @@ -85,7 +85,7 @@ org.spigotmc - spigot + spigot-api 1.11-R0.1-SNAPSHOT diff --git a/src/buttondevteam/alipresents/components/magic/tricks/CannonBowListener.java b/src/buttondevteam/alipresents/components/magic/tricks/CannonBowListener.java index 1dc1017..3bf6f60 100644 --- a/src/buttondevteam/alipresents/components/magic/tricks/CannonBowListener.java +++ b/src/buttondevteam/alipresents/components/magic/tricks/CannonBowListener.java @@ -1,14 +1,10 @@ package buttondevteam.alipresents.components.magic.tricks; -import java.lang.reflect.Field; - import org.bukkit.Location; import org.bukkit.Material; import org.bukkit.Particle; import org.bukkit.Sound; import org.bukkit.configuration.file.FileConfiguration; -import org.bukkit.craftbukkit.v1_11_R1.entity.CraftLivingEntity; -import org.bukkit.craftbukkit.v1_11_R1.entity.CraftTNTPrimed; import org.bukkit.enchantments.Enchantment; import org.bukkit.entity.Arrow; import org.bukkit.entity.EntityType; @@ -22,9 +18,6 @@ import org.bukkit.inventory.ItemStack; import org.bukkit.plugin.java.JavaPlugin; import org.bukkit.util.Vector; -import net.minecraft.server.v1_11_R1.EntityLiving; -import net.minecraft.server.v1_11_R1.EntityTNTPrimed; - public class CannonBowListener implements Listener { private static double SpeedMultiplier = 1.5; private static double minforce = 0.2; @@ -78,7 +71,7 @@ public class CannonBowListener implements Listener { }else{ //Spawn TNT TNTPrimed tnt = (TNTPrimed) arrow.getWorld().spawnEntity(arrow.getLocation(), EntityType.PRIMED_TNT); - + /* // Change via NMS the source of the TNT by the player EntityLiving nmsPlayer = (EntityLiving) (((CraftLivingEntity) player).getHandle()); EntityTNTPrimed nmsTNT = (EntityTNTPrimed) (((CraftTNTPrimed) tnt).getHandle()); @@ -88,7 +81,7 @@ public class CannonBowListener implements Listener { sourceField.set(nmsTNT, nmsPlayer); } catch (Exception ex) { ex.printStackTrace(); - } + }*/ // tnt.setVelocity(playerVector.multiply(getSpeedMultiplier()).multiply(event.getForce()));