Update for 1.21.11

This commit is contained in:
Jason Penilla committed 2025-12-13 17:38:22 -07:00
1 parent 32026338f9
commit 2f73050b4c
7 files changed
+13 -12

No files matched your search

@@ -45,7 +45,7 @@ public interface FabricCommander extends Commander, ForwardingAudience.Single {
@Override
public boolean hasPermission(final String permission) {
return Permissions.check(this.commandSourceStack, permission, this.commandSourceStack.getServer().operatorUserPermissionLevel());
return Permissions.check(this.commandSourceStack, permission, this.commandSourceStack.getServer().operatorUserPermissions().level());
}
}
@@ -55,7 +55,7 @@ public record FabricPlayerCommander(
@Override
public boolean hasPermission(final String permission) {
return Permissions.check(this.commandSourceStack, permission, this.commandSourceStack.getServer().operatorUserPermissionLevel());
return Permissions.check(this.commandSourceStack, permission, this.commandSourceStack.getServer().operatorUserPermissions().level());
}
}
@@ -38,15 +38,15 @@ import net.minecraft.network.chat.ChatType;
import net.minecraft.network.chat.FilterMask;
import net.minecraft.network.chat.OutgoingChatMessage;
import net.minecraft.network.chat.PlayerChatMessage;
import net.minecraft.resources.Identifier;
import net.minecraft.resources.ResourceKey;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.server.level.ServerPlayer;
import org.checkerframework.checker.nullness.qual.MonotonicNonNull;
import org.jetbrains.annotations.Nullable;
public class FabricChatHandler extends ChatListenerInternal implements ServerMessageEvents.AllowChatMessage {
public static final ResourceLocation CHAT_TYPE_KEY = ResourceLocation.fromNamespaceAndPath("carbonchat", "chat");
public static final Identifier CHAT_TYPE_KEY = Identifier.fromNamespaceAndPath("carbonchat", "chat");
private final CarbonChatFabric carbonChat;
private @MonotonicNonNull ResourceKey<ChatType> chatTypeResourceKey;
@@ -163,7 +163,7 @@ public class CarbonPlayerFabric extends WrappedCarbonPlayer implements Forwardin
@Override
public boolean hasPermission(final String permission) {
return this.player()
.map(player -> Permissions.check(player, permission, player.level().getServer().operatorUserPermissionLevel()))
.map(player -> Permissions.check(player, permission, player.level().getServer().operatorUserPermissions().level()))
.orElse(false);
}