Package com.sijobe.spc.wrapper

Examples of com.sijobe.spc.wrapper.Player.trace()


    * @see com.sijobe.spc.wrapper.CommandBase#execute(com.sijobe.spc.wrapper.CommandSender, java.util.List)
    */
   @Override
   public void execute(CommandSender sender, List<?> params) throws CommandException {
      Player player = getSenderAsPlayer(sender);
      Coordinate block = player.trace(128);
      if (block == null) {
         throw new CommandException("No block within range.");
      }
      Coordinate fire = new Coordinate(block.getBlockX(), block.getBlockY() + 1, block.getBlockZ());
      if (player.getWorld().getBlockId(fire) == 0) {
View Full Code Here


      int quantity = 1;
      if (params.size() > 1) {
         quantity = (Integer)params.get(1);
      }
      Player player = super.getSenderAsPlayer(sender);
      Coordinate coord = player.trace(128);
      if (coord == null) {
         coord = player.getPosition();
         coord = new Coordinate(coord.getX() + (Math.random() * 10) - 5, coord.getY(), coord.getZ() + (Math.random() * 10) - 5);
      }
      for (int i = 0; i < quantity; i++) {
View Full Code Here

  @Override
  public void execute(CommandSender sender, List<?> params)
      throws CommandException {
    Player player = super.getSenderAsPlayer(sender);
    Coordinate c = player.trace(128D);
    if (c == null) {
      throw new CommandException("No block within range.");
    }
   
    Entity.spawnEntity("EnderCrystal", c, player.getWorld());
View Full Code Here

  @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());
  }

}
View Full Code Here

         }
         world.setThunder(thunder);
         world.setRaining(thunder);
         sender.sendMessageToPlayer("Thunder was " + FontColour.AQUA + (thunder ? "enabled" : "disabled"));
      } else if (argument.equalsIgnoreCase("lightning")) {
         Coordinate coordinate = player.trace(128.0);
         if (coordinate == null) {
            return;
         }
         world.useLightning(coordinate);
      } else {
View Full Code Here

    * @see com.sijobe.spc.wrapper.CommandBase#execute(com.sijobe.spc.wrapper.CommandSender, java.util.List)
    */
   @Override
   public void execute(CommandSender sender, List<?> params) throws CommandException {
      Player player = getSenderAsPlayer(sender);
      Coordinate hit = player.trace(128);
      if (hit == null) {
         throw new CommandException("No block in sight.");
      }
      int y = hit.getBlockY() + 1;
      while (y < 260) {
View Full Code Here

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.