Package com.sijobe.spc.command

Source Code of com.sijobe.spc.command.Firework

package com.sijobe.spc.command;

import java.util.List;

import com.sijobe.spc.wrapper.CommandException;
import com.sijobe.spc.wrapper.CommandSender;
import com.sijobe.spc.wrapper.Coordinate;
import com.sijobe.spc.wrapper.Entity;
import com.sijobe.spc.wrapper.Player;

/**
* Creates an endercrystal where the player is pointing
*
* @author simo_415
* @version 1.0
*/
@Command (
   name = "firework",
   description = "Launches a random firework in the direction of the player",
   example = "",
   videoURL = "", // TODO
   version = "1.4.6",
   enabled = false
)
public class Firework extends StandardCommand {

  @Override
  public void execute(CommandSender sender, List<?> params)
      throws CommandException {
    Player player = super.getSenderAsPlayer(sender);
    Coordinate c = player.trace(128D);
    Entity.spawnEntity("FireworksRocketEntity", c, player.getWorld());
  }

}
TOP

Related Classes of com.sijobe.spc.command.Firework

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.