@Override
	public synchronized void run() {
		long timeLeft = getRemainingTime();
		Iterator<Action> actions = this.actions.iterator();
		List<OrderDependentAction> orderedActions = new ArrayList<OrderDependentAction>();
		while(actions.hasNext()) {
			Action action = actions.next();
			if(action.activate(timeLeft)) {
				if(!(action instanceof OrderDependentAction)) {
					action.perform();
					actions.remove();
				} else
					orderedActions.add((OrderDependentAction) action);
			}
		}
		if(!orderedActions.isEmpty()) {
			Collections.sort(orderedActions, new OrderDependentActionComparator());
			for(OrderDependentAction action : orderedActions) {
				action.perform();
				this.actions.remove(action);
			}
		}
		plugin.updateScoreboard();
		if(timeLeft <= 0)
			plugin.handleRestart();
	}