suppress warnings

This commit is contained in:
NotCoded committed 2024-08-14 21:51:54 +02:00
1 parent fde3c52963
commit 4b0150bf23
6 files changed
+6 -1

No files matched your search

@@ -60,7 +60,6 @@ public interface Player extends LivingEntity, MessageReceiver {
void setGameMode(GameModeType gameMode);
String getRawName();
UUID getUUID();
int getLatency();
Scoreboard getScoreboard();
@@ -14,6 +14,7 @@ import org.jetbrains.annotations.NotNull;
*/
@Deprecated
@SuppressWarnings("EmptyBlockTag")
public class StructureMap {
// Default
@@ -6,6 +6,7 @@ import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
@Mixin(Player.class)
@SuppressWarnings("UnusedMethod")
public class PlayerMixin {
// Fixes MC-193343
@@ -9,6 +9,7 @@ import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Overwrite;
@Mixin(ProtectionEnchantment.class)
@SuppressWarnings({"InvalidBlockTag", "MissingSummary"})
public class ProtectionEnchantmentMixin {
/**
* @author NotInfinityy
@@ -18,6 +18,7 @@ import org.spongepowered.asm.mixin.injection.Slice;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
@Mixin(ServerPlayer.class)
@SuppressWarnings("UnusedMethod")
public abstract class ServerPlayerMixin extends Player {
public ServerPlayerMixin(Level level, BlockPos blockPos, float f, GameProfile gameProfile) {
super(level, blockPos, f, gameProfile);
@@ -38,6 +39,7 @@ public abstract class ServerPlayerMixin extends Player {
* This fixes players still sleeping after they have been switched to spectator mode (<a href="https://bugs.mojang.com/browse/MC-119417">MC-119417</a>)
* And also fixes <a href="https://bugs.mojang.com/browse/MC-81773">MC-81773</a> and <a href="https://bugs.mojang.com/browse/MC-206705">MC-206705</a>
*/
@SuppressWarnings("UnusedVariable")
@Inject(method = "setGameMode", at = @At(value = "INVOKE", target = "Lnet/minecraft/server/level/ServerPlayer;stopRiding()V"))
private void onChangeToSpectator(GameType gameType, CallbackInfo ci) {
this.stopSleeping();
@@ -260,6 +260,7 @@ public abstract class ServerGamePacketListenerImplMixin {
@Unique private static final String[] ABUSABLE_SEQUENCES = { "@", "[", "nbt", "=", "{", "}", "]" };
@SuppressWarnings("UnusedMethod")
@Inject(method = "handleCustomCommandSuggestions", at = @At("HEAD"), cancellable = true)
private void fixSuggestionsCrash(ServerboundCommandSuggestionPacket serverboundCommandSuggestionPacket, CallbackInfo ci) {
final String text = serverboundCommandSuggestionPacket.getCommand();