Examples of handlePlayerLeave()


Examples of com.tommytony.war.Warzone.handlePlayerLeave()

        Warzone warzone = Warzone.getZoneByName(args[0]);
        if (warzone != null && warzone.getTeleport() != null) {
          Warzone playerWarzone = Warzone.getZoneByPlayerName(player.getName());
          int warmup = War.war.getWarConfig().getInt(WarConfig.TPWARMUP);
          if (playerWarzone != null) {
            playerWarzone.handlePlayerLeave(player, warzone.getTeleport(), true);
          }
          if (warmup > 0 && !player.hasPermission("war.warmupexempt")) {
            final int TICKS_PER_SECOND = 20;
            TeleportPlayerJob job = new TeleportPlayerJob(player, warzone.getTeleport());
            job.runTaskLater(War.war, warmup);
View Full Code Here

Examples of com.tommytony.war.Warzone.handlePlayerLeave()

    } else if (!War.war.canWarp(player)) {
      this.badMsg("warhub.permission");
    } else {
      Warzone playerWarzone = Warzone.getZoneByPlayerName(player.getName());
      if (playerWarzone != null) { // was in zone
        playerWarzone.handlePlayerLeave(player, War.war.getWarHub().getLocation(), true);
      }
      int warmup = War.war.getWarConfig().getInt(WarConfig.TPWARMUP);
      if (warmup > 0 && !player.hasPermission("war.warmupexempt")) {
        final int TICKS_PER_SECOND = 20;
        TeleportPlayerJob job = new TeleportPlayerJob(player, War.war.getWarHub().getLocation());
View Full Code Here

Examples of com.tommytony.war.Warzone.handlePlayerLeave()

    Warzone zone = Warzone.getZoneByPlayerName(player.getName());
    if (zone == null) {
      return false;
    }

    zone.handlePlayerLeave(player, zone.getEndTeleport(LeaveCause.COMMAND), true);
    return true;
  }
}
View Full Code Here

Examples of com.tommytony.war.Warzone.handlePlayerLeave()

  public void onPlayerQuit(final PlayerQuitEvent event) {
    if (War.war.isLoaded()) {
      Player player = event.getPlayer();
      Warzone zone = Warzone.getZoneByPlayerName(player.getName());
      if (zone != null) {
        zone.handlePlayerLeave(player, zone.getEndTeleport(LeaveCause.DISCONNECT), true);
      }

      if (War.war.isWandBearer(player)) {
        War.war.removeWandBearer(player);
      }
View Full Code Here

Examples of com.tommytony.war.Warzone.handlePlayerLeave()

      Player player = event.getPlayer();
      Warzone warzone = Warzone.getZoneByLocation(player);
     
      if (warzone != null) {
        // kick player from warzone as well
        warzone.handlePlayerLeave(player, warzone.getEndTeleport(LeaveCause.DISCONNECT), true);
      }
    }
  }

  @EventHandler
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.