Remove non-throwable callbacks as they are already supported anyways

This commit is contained in:
JFronny 2021-10-03 13:10:15 +02:00
parent 667b41a436
commit 06442bcad3
No known key found for this signature in database
GPG Key ID: BEC5ACBBD4EE17E5
1 changed files with 0 additions and 17 deletions

View File

@ -34,23 +34,6 @@ public class HookImplementation {
disabled = false;
}
}
public static <T> T disable(Supplier<T> then) {
try {
disabled = true;
return then.get();
}
finally {
disabled = false;
}
}
public static void disable(Runnable then) {
try {
disabled = true;
then.run();
} finally {
disabled = false;
}
}
public static boolean hookContains(boolean value, ResourcePack pack, ResourceType type, Identifier id) {
return disabled ? value : UserResourceEvents.CONTAINS.invoker().contains(type, id, value, pack);