Removed NMS because of build errors

This commit is contained in:
alisolarflare 2016-12-22 04:37:36 -05:00
parent 1f75e7cbf3
commit 8f8d175609
2 changed files with 3 additions and 10 deletions

View file

@ -85,7 +85,7 @@
<dependencies> <dependencies>
<dependency> <dependency>
<groupId>org.spigotmc</groupId> <groupId>org.spigotmc</groupId>
<artifactId>spigot</artifactId> <artifactId>spigot-api</artifactId>
<version>1.11-R0.1-SNAPSHOT</version> <version>1.11-R0.1-SNAPSHOT</version>
</dependency> </dependency>
<!-- https://mvnrepository.com/artifact/org.apache.commons/commons-lang3 --> <!-- https://mvnrepository.com/artifact/org.apache.commons/commons-lang3 -->

View file

@ -1,14 +1,10 @@
package buttondevteam.alipresents.components.magic.tricks; package buttondevteam.alipresents.components.magic.tricks;
import java.lang.reflect.Field;
import org.bukkit.Location; import org.bukkit.Location;
import org.bukkit.Material; import org.bukkit.Material;
import org.bukkit.Particle; import org.bukkit.Particle;
import org.bukkit.Sound; import org.bukkit.Sound;
import org.bukkit.configuration.file.FileConfiguration; 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.enchantments.Enchantment;
import org.bukkit.entity.Arrow; import org.bukkit.entity.Arrow;
import org.bukkit.entity.EntityType; import org.bukkit.entity.EntityType;
@ -22,9 +18,6 @@ import org.bukkit.inventory.ItemStack;
import org.bukkit.plugin.java.JavaPlugin; import org.bukkit.plugin.java.JavaPlugin;
import org.bukkit.util.Vector; 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 { public class CannonBowListener implements Listener {
private static double SpeedMultiplier = 1.5; private static double SpeedMultiplier = 1.5;
private static double minforce = 0.2; private static double minforce = 0.2;
@ -78,7 +71,7 @@ public class CannonBowListener implements Listener {
}else{ }else{
//Spawn TNT //Spawn TNT
TNTPrimed tnt = (TNTPrimed) arrow.getWorld().spawnEntity(arrow.getLocation(), EntityType.PRIMED_TNT); TNTPrimed tnt = (TNTPrimed) arrow.getWorld().spawnEntity(arrow.getLocation(), EntityType.PRIMED_TNT);
/*
// Change via NMS the source of the TNT by the player // Change via NMS the source of the TNT by the player
EntityLiving nmsPlayer = (EntityLiving) (((CraftLivingEntity) player).getHandle()); EntityLiving nmsPlayer = (EntityLiving) (((CraftLivingEntity) player).getHandle());
EntityTNTPrimed nmsTNT = (EntityTNTPrimed) (((CraftTNTPrimed) tnt).getHandle()); EntityTNTPrimed nmsTNT = (EntityTNTPrimed) (((CraftTNTPrimed) tnt).getHandle());
@ -88,7 +81,7 @@ public class CannonBowListener implements Listener {
sourceField.set(nmsTNT, nmsPlayer); sourceField.set(nmsTNT, nmsPlayer);
} catch (Exception ex) { } catch (Exception ex) {
ex.printStackTrace(); ex.printStackTrace();
} }*/
// //
tnt.setVelocity(playerVector.multiply(getSpeedMultiplier()).multiply(event.getForce())); tnt.setVelocity(playerVector.multiply(getSpeedMultiplier()).multiply(event.getForce()));