Package com.tommytony.war.command

Examples of com.tommytony.war.command.ZoneSetter


  public void onPlayerInteract(PlayerInteractEvent event) {
    if (War.war.isLoaded()) {
      Player player = event.getPlayer();
      if (player.getItemInHand().getType() == Material.WOOD_SWORD && War.war.isWandBearer(player)) {
        String zoneName = War.war.getWandBearerZone(player);
        ZoneSetter setter = new ZoneSetter(player, zoneName);
        if (event.getAction() == Action.LEFT_CLICK_AIR || event.getAction() == Action.RIGHT_CLICK_AIR) {
          War.war.badMsg(player, "wand.toofar");
        } else if (event.getAction() == Action.LEFT_CLICK_BLOCK) {
          setter.placeCorner1(event.getClickedBlock());
          event.setUseItemInHand(Result.ALLOW);
        } else if (event.getAction() == Action.RIGHT_CLICK_BLOCK) {
          setter.placeCorner2(event.getClickedBlock());
          event.setUseItemInHand(Result.ALLOW);
        }
      }

      Warzone zone = Warzone.getZoneByPlayerName(player.getName());
View Full Code Here

TOP

Related Classes of com.tommytony.war.command.ZoneSetter

Copyright © 2018 www.massapicom. 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.