Examples of EpicZone


Examples of com.bukkit.epicsaga.EpicZones.EpicZone

    myZones.clear();
    myZoneTags.clear();
    try {
      while(scanner.hasNext())
      {
        EpicZone newZone;
        line = scanner.nextLine().trim();
        if(line.startsWith("#") || line.isEmpty()){continue;}
        newZone = new EpicZone(line);;
        General.myZones.put(newZone.getTag(), newZone);
        General.myZoneTags.add(newZone.getTag());
      }

    }
    finally {
      scanner.close();
View Full Code Here

Examples of com.bukkit.epicsaga.EpicZones.EpicZone

  private static void reconcileChildren()
  {

    for(String zoneTag: myZoneTags)
    {
      EpicZone zone = myZones.get(zoneTag);
      if(zone.hasChildren())
      {
        //System.out.println("Attaching Child Zones To " + zone.getName() + "[" + zone.getTag() + "].");
        for(String child: zone.getChildrenTags())
        {
          EpicZone childZone = myZones.get(child);
          //System.out.println("\t" + childZone.getName() + "[" + childZone.getTag() + "] added as a child of " + zone.getName() + "[" + zone.getTag() + "].");

          childZone.setParent(zone);
          zone.addChild(childZone);

          myZones.remove(child);
          myZones.put(child, childZone);
        }
View Full Code Here

Examples of com.bukkit.epicsaga.EpicZones.EpicZone

  }

  public static EpicZone getZoneForPoint(Player player,  EpicZonePlayer ezp, int playerHeight, Point playerPoint)
  {

    EpicZone result = null;
    String resultTag = "";

    for(String zoneTag: General.myZoneTags)
    {
      EpicZone zone = General.myZones.get(zoneTag);
      resultTag = General.isPointInZone(zone, playerHeight, playerPoint);
      if(resultTag.length() > 0)
      {
        result = General.myZones.get(resultTag);
        break;
View Full Code Here

Examples of com.bukkit.epicsaga.EpicZones.EpicZone

  }

  public static EpicZone getZoneForPoint(Player player, EpicZonePlayer ezp, int playerHeight, Point playerPoint, String worldName)
  {

    EpicZone result = null;
    String resultTag = "";

    for(String zoneTag: General.myZoneTags)
    {
      EpicZone zone = General.myZones.get(zoneTag);
      resultTag = General.isPointInZone(zone, playerHeight, playerPoint, worldName);
      if(resultTag.length() > 0)
      {
        result = General.myZones.get(resultTag);
        break;
View Full Code Here

Examples of com.bukkit.epicsaga.EpicZones.EpicZone

  }

  private static void buildWho(EpicZonePlayer ezp, Player player, int pageNumber, boolean allZones)
  {

    EpicZone currentZone = General.getPlayer(player.getName()).getCurrentZone();
    if(currentZone == null){allZones = true;}
    ArrayList<EpicZonePlayer> players = getPlayers(currentZone, allZones);
    int playersPerPage = 8;
    int playerCount = players.size();

    if (allZones)
    {
      player.sendMessage(playerCount + " Players Online [Page " + pageNumber + " of " + ((int)Math.ceil((double)playerCount / (double)playersPerPage) + 1) + "]");
      for(int i = (pageNumber - 1) * playersPerPage; i < (pageNumber * playersPerPage); i++)
      {
        if (players.size() > i)
        {
          player.sendMessage(buildWhoPlayerName(ezp, players, i, allZones));
        }
      }
    }
    else
    {
      player.sendMessage(playerCount + " Players Online in " + currentZone.getName() + " [Page " + pageNumber + " of " + ((int)Math.ceil((double)playerCount / playersPerPage) + 1) + "]");
      for(int i = (pageNumber - 1) * playersPerPage; i < pageNumber * playersPerPage; i++)
      {
        if (players.size() > i)
        {
          player.sendMessage(buildWhoPlayerName(ezp, players, i, allZones));
View Full Code Here

Examples of com.bukkit.epicsaga.EpicZones.EpicZone

      myZones.clear();
      myZoneTags.clear();
      try {
        while(scanner.hasNext())
        {
          EpicZone newZone;
          line = scanner.nextLine().trim();
          if(line.startsWith("#") || line.isEmpty()){continue;}
          newZone = new EpicZone(line);;
          General.myZones.put(newZone.getTag(), newZone);
          General.myZoneTags.add(newZone.getTag());
        }

      }
      finally {
        scanner.close();
View Full Code Here

Examples of com.bukkit.epicsaga.EpicZones.EpicZone

  private static void reconcileChildren()
  {

    for(String zoneTag: myZoneTags)
    {
      EpicZone zone = myZones.get(zoneTag);
      if(zone.hasChildren())
      {
        //System.out.println("Attaching Child Zones To " + zone.getName() + "[" + zone.getTag() + "].");
        for(String child: zone.getChildrenTags())
        {
          EpicZone childZone = myZones.get(child);
          //System.out.println("\t" + childZone.getName() + "[" + childZone.getTag() + "] added as a child of " + zone.getName() + "[" + zone.getTag() + "].");

          childZone.setParent(zone);
          zone.addChild(childZone);

          myZones.remove(child);
          myZones.put(child, childZone);
        }
View Full Code Here

Examples of com.bukkit.epicsaga.EpicZones.EpicZone

    String result = "#Zone Tag|World|Zone Name|Flags|Enter Message|Exit Message|Floor|Ceiling|Child Zones|PointList\n";
    String line = "";

    for(String tag: myZoneTags)
    {
      EpicZone z = myZones.get(tag);
      line = z.getTag() + "|";
      line = line + z.getWorld() + "|";
      line = line + z.getName() + "|";
      line = line + BuildFlags(z) + "|";
      line = line + z.getEnterText() + "|";
      line = line + z.getExitText() + "|";
      line = line + z.getFloor() + "|";
      line = line + z.getCeiling() + "|";
      line = line + BuildChildren(z) + "|";
      line = line + BuildPointList(z) + "\n";
      result = result + line;
    }
View Full Code Here

Examples of com.bukkit.epicsaga.EpicZones.EpicZone

  }

  public static EpicZone getZoneForPoint(Player player, EpicZonePlayer ezp, int playerHeight, Point playerPoint, String worldName)
  {

    EpicZone result = null;
    String resultTag = "";

    for(String zoneTag: General.myZoneTags)
    {
      EpicZone zone = General.myZones.get(zoneTag);
      resultTag = General.isPointInZone(zone, playerHeight, playerPoint, worldName);
      if(resultTag.length() > 0)
      {
        result = General.myZones.get(resultTag);
        break;
View Full Code Here

Examples of com.bukkit.jblaske.EpicZones.EpicZone

  }

  public static EpicZone getZone(String zoneName)
  {

    EpicZone result = null;

    if (myZones != null)
    {
      for(EpicZone ez: myZones)
      {
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.