- [FEAT] New APIs for Maintenance Mode and rewrite commands system
- [FEAT] Improved config system to fix old loading bugs and support JSON - [FEAT] LuckPerms support for commands
This commit is contained in:
@@ -9,7 +9,7 @@
|
||||
@Mixin(value = ServerGamePacketListenerImpl.class, priority = Integer.MIN_VALUE)
|
||||
public class ServerGamePacketListenerImplMixin {
|
||||
|
||||
@@ -22,11 +24,12 @@
|
||||
@@ -22,13 +24,14 @@
|
||||
public ServerPlayer player;
|
||||
|
||||
@Inject(
|
||||
@@ -19,8 +19,12 @@
|
||||
cancellable = true
|
||||
)
|
||||
- private void injectChatEvent(PlayerChatMessage arg, Component arg2, FilteredText arg3, CallbackInfo ci) {
|
||||
- Component finalcomp = arg2 == null ? arg.decoratedContent() : arg2;
|
||||
- CraterServerChatEvent event = new CraterServerChatEvent(BridgedPlayer.of(this.player), finalcomp.getString(), ChatUtils.mojangToAdventure(finalcomp));
|
||||
+ private void injectChatEvent(PlayerChatMessage arg, CompletableFuture<FilteredText> completableFuture, CompletableFuture<Component> completableFuture2, Void void_, CallbackInfo ci) {
|
||||
+ Component arg2 = completableFuture2.join();
|
||||
Component finalArg = arg2 == null ? arg.decoratedContent() : arg2;
|
||||
CraterServerChatEvent event = new CraterServerChatEvent(BridgedPlayer.of(this.player), finalArg.getString(), ChatUtils.mojangToAdventure(finalArg));
|
||||
+ Component finalArg = arg2 == null ? arg.decoratedContent() : arg2;
|
||||
+ CraterServerChatEvent event = new CraterServerChatEvent(BridgedPlayer.of(this.player), finalArg.getString(), ChatUtils.mojangToAdventure(finalArg));
|
||||
CraterEventBus.INSTANCE.postEvent(event);
|
||||
if (event.wasCancelled())
|
||||
ci.cancel();
|
||||
|
Reference in New Issue
Block a user