How can I spawn Primed tnt all I need is the rest of the player.(NotTheRealCode)SpawnPrimerTNT.class or whatever it is please get back to me asap So the code is like player.LaunchProjectile.PrimedTNT.class Ik thats not it please tell me what it is
Try: TNTPrimed tnt = target.getWorld().spawn(target.getLocation(), TNTPrimed.class); Hopefully you can figure the rest out.
Try: Code:java if(cmd.getName().equalsIgnoreCase("PTNT")){ if(args.length == 0){ sender.sendMessage("Target a player!"); }else if(args.length == 1){ Player target = Bukkit.getPlayer(args[0]); World world = target.getWorld(); Location loc = target.getLocation(); TNTPrimed tnt = world.spawn(loc, TNTPrimed.class); }
Its not a command thats the thing I have all these that work I just dont know what to put for tnt Code: switch(a) { case FIREBALL: player.launchProjectile(LargeFireball.class); return null; case ARROW: return player.launchProjectile(Arrow.class).getUniqueId(); case CREEPER: return player.launchProjectile(Egg.class).getUniqueId(); case GUN: return player.launchProjectile(Snowball.class).getUniqueId(); case THUNDER: return player.launchProjectile(WitherSkull.class).getUniqueId(); case HEAL: player.setHealth(player.getMaxHealth()); return null; case SHOTGUN: return player.launchProjectile(Snowball.class).getUniqueId(); case AUTOMATIC: return player.launchProjectile(Snowball.class).getUniqueId(); case TNT: return );; EDIT by Moderator: merged posts, please use the edit button instead of double posting.
return player.launchProjectile(TNTPrimed.class).getUniqueId(); ??? Two things: Use pastebin.com Tell us what you want, we can't read your mind.
Trevor1134 you can't launch a TNTPrimed as a projectile as it does not extend Projectile. snake4212 use this: Code:java TNTPrimed tnt = player.getWorld().spawn(player.getLocation(), TNTPrimed.class); tnt.setVelocity(player.getLocation().getDirection());return tnt.getUniqueId();
snake4212 chasechocolate I know that, I was just curious as to if snake was looking for THAT to happen.