fix oopsie
This commit is contained in:
parent
df86f61828
commit
5c488dc8e1
1 changed files with 4 additions and 8 deletions
|
@ -7,6 +7,7 @@ import org.bukkit.World;
|
|||
import org.bukkit.persistence.PersistentDataType;
|
||||
import org.bukkit.scoreboard.Team;
|
||||
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.ArrayList;
|
||||
import java.util.OptionalDouble;
|
||||
|
@ -26,14 +27,9 @@ public class EventRunner implements Runnable {
|
|||
long lastRunDay = world.getPersistentDataContainer().get(eventKey, PersistentDataType.LONG);
|
||||
day = Bukkit.getWorld("world").getFullTime() / 24000;
|
||||
|
||||
if (day > lastRunDay && !currentEvents.isEmpty()) {
|
||||
for (Event event : currentEvents) {
|
||||
event.eventTimeEnded();
|
||||
}
|
||||
|
||||
// When event doesn't properly handle eventTimeEnded
|
||||
for (Event event : currentEvents) {
|
||||
event.eventFailed();
|
||||
if (day > lastRunDay) {
|
||||
while (!currentEvents.isEmpty()) {
|
||||
currentEvents.getFirst().eventTimeEnded();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue