blob: c02ddba428300f474970407d61606fb0ea7c9a99 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
package me.xmrvizzy.skyblocker.utils.events;
import net.fabricmc.fabric.api.event.Event;
import net.fabricmc.fabric.api.event.EventFactory;
import net.minecraft.util.ActionResult;
public interface SkyblockLeaveCallback {
Event<SkyblockLeaveCallback> EVENT = EventFactory.createArrayBacked(SkyblockLeaveCallback.class,
(listeners) -> () -> {
for (SkyblockLeaveCallback listener : listeners) {
ActionResult result = listener.leave();
if(result != ActionResult.PASS) {
return result;
}
}
return ActionResult.PASS;
});
ActionResult leave();
}
|