package eu.mhsl.minenet.minigames.util;

public class SingleExecution {
    public static SingleExecution make() {
        return new SingleExecution();
    }

    private boolean wasExecuted = false;

    public void reset() {
        this.wasExecuted = false;
    }

    public void singleRun(Runnable task) {
        if(wasExecuted) return;
        task.run();
        this.wasExecuted = true;
    }
}
