Updated to 23w41a

Signed-off-by: shedaniel <daniel@shedaniel.me>
This commit is contained in:
shedaniel
2023-10-17 11:05:48 +08:00
parent 731a772ab1
commit c0d6cb9e6b
3 changed files with 22 additions and 11 deletions

View File

@@ -73,6 +73,11 @@ public class DebugEvents {
return EventResult.interruptTrue();
});
CommandPerformEvent.EVENT.register(event -> {
if (event.getResults().getReader().getString().startsWith("help")) {
TestMod.SINK.accept("Cancelling help command as a test!");
return EventResult.interruptFalse();
}
TestMod.SINK.accept("Server command performed: " + event.getResults().getReader().getString());
return EventResult.pass();
});