Refactored Generation and class structure

This commit is contained in:
2023-11-11 22:13:58 +01:00
parent d9bbaf9865
commit 6dc4269367
53 changed files with 1049 additions and 72 deletions

View File

@@ -0,0 +1,19 @@
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;
}
}