12345678910111213141516171819202122232425 |
- package me.shedaniel.clothconfig2.api;
- import me.shedaniel.clothconfig2.impl.RunSixtyTimesEverySecImpl;
- import org.jetbrains.annotations.ApiStatus;
- @Deprecated
- @ApiStatus.ScheduledForRemoval
- public interface RunSixtyTimesEverySec {
-
- void run();
-
- default boolean isRegistered() {
- return RunSixtyTimesEverySecImpl.TICKS_LIST.contains(this);
- }
-
- default void registerTick() {
- RunSixtyTimesEverySecImpl.TICKS_LIST.removeIf(runSixtyTimesEverySec -> runSixtyTimesEverySec == this);
- RunSixtyTimesEverySecImpl.TICKS_LIST.add(this);
- }
-
- default void unregisterTick() {
- RunSixtyTimesEverySecImpl.TICKS_LIST.remove(this);
- }
-
- }
|