Fix war invasion

This commit is contained in:
Shaun Bennett 2015-10-29 13:14:27 -04:00
parent fd1638a572
commit 364d8b05af

View File

@ -232,7 +232,7 @@ public class WarManager extends MiniPlugin
while (invasionIterator.hasNext()) while (invasionIterator.hasNext())
{ {
WarInvasion invasion = invasionIterator.next(); WarInvasion invasion = invasionIterator.next();
if (invasion.getEndTime() > currentTime) if (currentTime >= invasion.getEndTime())
{ {
WarInvasionEndEvent endEvent = new WarInvasionEndEvent(invasion); WarInvasionEndEvent endEvent = new WarInvasionEndEvent(invasion);
Bukkit.getServer().getPluginManager().callEvent(endEvent); Bukkit.getServer().getPluginManager().callEvent(endEvent);
@ -249,7 +249,7 @@ public class WarManager extends MiniPlugin
@EventHandler @EventHandler
public void onInvasionStart(WarInvasionStartEvent event) public void onInvasionStart(WarInvasionStartEvent event)
{ {
Bukkit.broadcastMessage(F.main("War", F.elem(event.getWarInvasion().getInvaderClan()) + " can now invade " + F.elem(event.getWarInvasion().getInvaderClan()))); Bukkit.broadcastMessage(F.main("War", F.elem(event.getWarInvasion().getInvaderClan()) + " can now invade " + F.elem(event.getWarInvasion().getInvadedClan())));
} }
@EventHandler @EventHandler