Skip to content

Commit

Permalink
removed a fix targetting a 1.19-only bug
Browse files Browse the repository at this point in the history
  • Loading branch information
XTerPL committed Oct 1, 2022
1 parent 70da039 commit 9da9312
Showing 1 changed file with 0 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,24 +24,6 @@ private void chat(String message, CallbackInfo ci) {
}
}

@Inject(method = "sendCommand", at = @At("HEAD"), cancellable = true)
private void command(String command, CallbackInfoReturnable<Boolean> ci) {
SendChatEvent event = new SendChatEvent(command);
EventManager.getInstance().dispatch(event);
if (event.isCancelled()) {
ci.cancel();
}
}

@Inject(method = "sendCommandInternal", at = @At("HEAD"), cancellable = true)
private void commandInterval(String command, @Nullable Text preview, CallbackInfo ci) {
SendChatEvent event = new SendChatEvent(command);
EventManager.getInstance().dispatch(event);
if (event.isCancelled()) {
ci.cancel();
}
}

@Inject(method = "tick", at = @At("HEAD"))
private void tick(CallbackInfo ci) {
EventManager.getInstance().dispatch(new TickEvent());
Expand Down

0 comments on commit 9da9312

Please sign in to comment.