Search in sources :

Example 1 with BattleSessionEndedEvent

use of com.gmail.goosius.siegewar.events.BattleSessionEndedEvent in project SiegeWar by TownyAdvanced.

the class SiegeWarBattleSessionUtil method endBattleSession.

public static void endBattleSession() {
    BattleSession battleSession = BattleSession.getBattleSession();
    battleSession.setActive(false);
    battleResults.clear();
    /*
		 * Gather the results of all battles
		 * End any active battles
		 */
    for (Siege siege : SiegeController.getSieges()) endBattleSessionForSiege(siege);
    Bukkit.getPluginManager().callEvent(new BattleSessionEndedEvent());
    // Send message
    sendBattleSessionEndedMessage(battleResults);
    // Remove Battle Session Boss-Bars
    BossBarUtil.removeBattleSessionBossBars();
}
Also used : BattleSession(com.gmail.goosius.siegewar.objects.BattleSession) BattleSessionEndedEvent(com.gmail.goosius.siegewar.events.BattleSessionEndedEvent) Siege(com.gmail.goosius.siegewar.objects.Siege)

Aggregations

BattleSessionEndedEvent (com.gmail.goosius.siegewar.events.BattleSessionEndedEvent)1 BattleSession (com.gmail.goosius.siegewar.objects.BattleSession)1 Siege (com.gmail.goosius.siegewar.objects.Siege)1