mirror of
https://github.com/PaperMC/Velocity.git
synced 2026-02-17 14:37:43 +01:00
Fix suppress warnings on the packets
This commit is contained in:
@@ -10,8 +10,5 @@ tasks.withType(JavaCompile).configureEach {
|
|||||||
error("NullAway")
|
error("NullAway")
|
||||||
|
|
||||||
option("NullAway:AnnotatedPackages", "com.velocitypowered")
|
option("NullAway:AnnotatedPackages", "com.velocitypowered")
|
||||||
option("NullAway:ExcludedClasses",
|
|
||||||
"com.velocitypowered.proxy.network.packet.clientbound.ClientboundJoinGamePacket," +
|
|
||||||
"com.velocitypowered.proxy.network.packet.clientbound.ClientboundRespawnPacket")
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -36,7 +36,7 @@ import org.checkerframework.checker.nullness.qual.Nullable;
|
|||||||
|
|
||||||
// TODO: This class is in dire need of a refactor. Suppressing the warning is only done as an
|
// TODO: This class is in dire need of a refactor. Suppressing the warning is only done as an
|
||||||
// implicit acknowledgement that this code is very bad.
|
// implicit acknowledgement that this code is very bad.
|
||||||
@SuppressWarnings("WarnAway")
|
@SuppressWarnings("NullAway")
|
||||||
public class ClientboundJoinGamePacket implements Packet {
|
public class ClientboundJoinGamePacket implements Packet {
|
||||||
public static final PacketReader<ClientboundJoinGamePacket> DECODER = PacketReader.method(ClientboundJoinGamePacket::new);
|
public static final PacketReader<ClientboundJoinGamePacket> DECODER = PacketReader.method(ClientboundJoinGamePacket::new);
|
||||||
public static final PacketWriter<ClientboundJoinGamePacket> ENCODER = PacketWriter.deprecatedEncode();
|
public static final PacketWriter<ClientboundJoinGamePacket> ENCODER = PacketWriter.deprecatedEncode();
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ import org.checkerframework.checker.nullness.qual.Nullable;
|
|||||||
|
|
||||||
// TODO: This class is in dire need of a refactor. Suppressing the warning is only done as an
|
// TODO: This class is in dire need of a refactor. Suppressing the warning is only done as an
|
||||||
// implicit acknowledgement that this code is very bad.
|
// implicit acknowledgement that this code is very bad.
|
||||||
@SuppressWarnings("WarnAway")
|
@SuppressWarnings("NullAway")
|
||||||
public class ClientboundRespawnPacket implements Packet {
|
public class ClientboundRespawnPacket implements Packet {
|
||||||
public static final PacketReader<ClientboundRespawnPacket> DECODER = PacketReader.method(ClientboundRespawnPacket::new);
|
public static final PacketReader<ClientboundRespawnPacket> DECODER = PacketReader.method(ClientboundRespawnPacket::new);
|
||||||
public static final PacketWriter<ClientboundRespawnPacket> ENCODER = PacketWriter.deprecatedEncode();
|
public static final PacketWriter<ClientboundRespawnPacket> ENCODER = PacketWriter.deprecatedEncode();
|
||||||
|
|||||||
Reference in New Issue
Block a user