mirror of
https://github.com/darksaid98/HuskHomes.git
synced 2026-12-02 14:38:52 +00:00
New player list caching system, further refinements and fixes
This commit is contained in:
59 files changed
+445
-317
No files matched your search
@@ -0,0 +1,19 @@
|
||||
package net.william278.huskhomes.util;
|
||||
|
||||
import java.util.function.Consumer;
|
||||
|
||||
@FunctionalInterface
|
||||
public interface ThrowingConsumer<T> extends Consumer<T> {
|
||||
|
||||
@Override
|
||||
default void accept(final T elem) {
|
||||
try {
|
||||
acceptThrows(elem);
|
||||
} catch (final Exception e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
|
||||
void acceptThrows(T elem) throws Exception;
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user