Examples of CellDefendedEvent


Examples of com.palmergames.bukkit.townywar.event.CellDefendedEvent

      } catch (Exception e) {
        cellAttackEvent.setCancelled(true);
        cellAttackEvent.setReason(e.getMessage());
      }
    } else if (event.getEventName().equals("CellDefended")) {
      CellDefendedEvent cellDefendedEvent = (CellDefendedEvent)event;
      Player player = cellDefendedEvent.getPlayer();
      CellUnderAttack cell = cellDefendedEvent.getCell().getAttackData();
     
      TownyUniverse universe = plugin.getTownyUniverse();
      try {
        TownyWorld world = TownyUniverse.getDataSource().getWorld(cell.getWorldName());
        WorldCoord worldCoord = new WorldCoord(world, cell.getX(), cell.getZ());
View Full Code Here

Examples of com.palmergames.bukkit.townywar.event.CellDefendedEvent

    cell.cancel();
    removeCellUnderAttack(cell);
  }
 
  public static void attackDefended(Player player, CellUnderAttack cell) {
    CellDefendedEvent cellDefendedEvent = new CellDefendedEvent(player, cell);
    Bukkit.getServer().getPluginManager().callEvent(cellDefendedEvent);
    cell.cancel();
    removeCellUnderAttack(cell);
  }
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.