Penalties: Redo Marianas Trench.
This commit is contained in:
parent
3e083e4ce7
commit
cbfcecf2b4
|
@ -24,11 +24,17 @@ package fr.neatmonster.nocheatplus.actions.types.penalty;
|
|||
public final class CancelPenalty implements Penalty<CancelPenalty> {
|
||||
|
||||
public static final CancelPenalty CANCEL = new CancelPenalty();
|
||||
|
||||
private static boolean locked = false;
|
||||
|
||||
public CancelPenalty() {
|
||||
super(); // Magic.
|
||||
if (this != CANCEL) {
|
||||
throw new IllegalStateException("CancelPenalty.CANCEL is supposed to be the unique instance.");
|
||||
synchronized(CancelPenalty.class) {
|
||||
if (CancelPenalty.locked) {
|
||||
throw new IllegalStateException("CancelPenalty.CANCEL is supposed to be the unique instance.");
|
||||
}
|
||||
else {
|
||||
CancelPenalty.locked = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -21,6 +21,7 @@ import org.junit.Test;
|
|||
|
||||
import fr.neatmonster.nocheatplus.config.ConfPaths;
|
||||
import fr.neatmonster.nocheatplus.config.ConfigFile;
|
||||
import fr.neatmonster.nocheatplus.config.DefaultConfig;
|
||||
import fr.neatmonster.nocheatplus.config.PathUtils;
|
||||
import fr.neatmonster.nocheatplus.config.RawConfigFile;
|
||||
import fr.neatmonster.nocheatplus.logging.StaticLog;
|
||||
|
@ -99,4 +100,10 @@ public class TestConfig {
|
|||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testActionLists() {
|
||||
ConfigFile config = new DefaultConfig();
|
||||
config.getOptimizedActionList(ConfPaths.MOVING_SURVIVALFLY_ACTIONS, null);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue