Implement missing events for SDLink
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
package com.hypherionmc.craterlib.api.event.server;
|
||||
|
||||
import com.hypherionmc.craterlib.core.event.CraterEvent;
|
||||
import com.mojang.brigadier.CommandDispatcher;
|
||||
import net.minecraft.commands.CommandSourceStack;
|
||||
|
||||
public class CraterRegisterCommandEvent extends CraterEvent {
|
||||
|
||||
private final CommandDispatcher<CommandSourceStack> dispatcher;
|
||||
|
||||
public CraterRegisterCommandEvent(CommandDispatcher<CommandSourceStack> dispatcher) {
|
||||
this.dispatcher = dispatcher;
|
||||
}
|
||||
|
||||
public CommandDispatcher<CommandSourceStack> getDispatcher() {
|
||||
return dispatcher;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canCancel() {
|
||||
return false;
|
||||
}
|
||||
}
|
@@ -0,0 +1,45 @@
|
||||
package com.hypherionmc.craterlib.api.event.server;
|
||||
|
||||
import com.hypherionmc.craterlib.core.event.CraterEvent;
|
||||
import net.minecraft.server.MinecraftServer;
|
||||
|
||||
public class CraterServerLifecycleEvent extends CraterEvent {
|
||||
|
||||
public CraterServerLifecycleEvent() {}
|
||||
|
||||
@Override
|
||||
public boolean canCancel() {
|
||||
return false;
|
||||
}
|
||||
|
||||
public static class Starting extends CraterServerLifecycleEvent {
|
||||
|
||||
private final MinecraftServer server;
|
||||
|
||||
public Starting(MinecraftServer server) {
|
||||
this.server = server;
|
||||
}
|
||||
|
||||
public MinecraftServer getServer() {
|
||||
return server;
|
||||
}
|
||||
}
|
||||
|
||||
public static class Started extends CraterServerLifecycleEvent {
|
||||
|
||||
public Started() {}
|
||||
|
||||
}
|
||||
|
||||
public static class Stopping extends CraterServerLifecycleEvent {
|
||||
|
||||
public Stopping() {}
|
||||
|
||||
}
|
||||
|
||||
public static class Stopped extends CraterServerLifecycleEvent {
|
||||
|
||||
public Stopped() {}
|
||||
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user