Bonjour, je suis bloqué dans mon plugin "TntPropulse" et j'aimerai avoir votre aide.
Je ne sais pas comment propulser une tnt dans la direction ou le joueur regarde.
Résolu !
Je ne sais pas comment propulser une tnt dans la direction ou le joueur regarde.
Code:
@Override
public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) {
Player p = (Player) sender;
if(cmd.getName().equalsIgnoreCase("tntpropulse")){
//JETER LA TNT ICI
}
return false;
}
Résolu !
Code:
TNTPrimed tnt = (TNTPrimed) p.getWorld().spawn(p.getLocation(), TNTPrimed.class);
tnt.setVelocity(p.getLocation().getDirection().normalize().multiply(2))
Dernière édition par un modérateur: