Remove non-throwable callbacks as they are already supported anyways
This commit is contained in:
parent
667b41a436
commit
06442bcad3
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue