Need "Help" in coding "trail"

Discussion in 'Plugin Development' started by _TheRogue_, Feb 25, 2015.

Thread Status:
Not open for further replies.
  1. Offline

    _TheRogue_

    Code (open)

    public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) {
    if (cmd.getName().equalsIgnoreCase("trail") && sender instanceof Player) {
    Player player = (Player) sender;

    if (args.length == 2) {

    if (args[0].equalsIgnoreCase("hearts")) {
    if (args[1].equalsIgnoreCase("on")) {
    EntityEffect hearts = EntityEffect.WOLF_HEARTS;
    player.playEffect(hearts);
    }
    if (args[0].equalsIgnoreCase("off")) {
    // Remove the current effect
    }
    }



    What I would like to know:
    *How would I remove the effect using the command: /trail off
    *Did I do the command correct to do:/Trail hearts
    *How would I change the time that the particle stays there till it despawns.

    -Thanks! Iou one.
     
Thread Status:
Not open for further replies.

Share This Page