3
0
Mirror von https://github.com/PaperMC/Velocity.git synchronisiert 2024-11-17 05:20:14 +01:00

Clean ups around the codebase.

Dieser Commit ist enthalten in:
Andrew Steinborn 2018-08-27 00:24:58 -04:00
Ursprung c7469ec13c
Commit b5ebb4541f
3 geänderte Dateien mit 5 neuen und 5 gelöschten Zeilen

Datei anzeigen

@ -49,7 +49,7 @@ public class LoginPluginMessage implements MinecraftPacket {
this.id = ProtocolUtils.readVarInt(buf);
this.channel = ProtocolUtils.readString(buf);
if (buf.isReadable()) {
this.data = buf.readRetainedSlice(buf.readableBytes());
this.data = buf.readSlice(buf.readableBytes());
} else {
this.data = Unpooled.EMPTY_BUFFER;
}

Datei anzeigen

@ -49,7 +49,7 @@ public class LoginPluginResponse implements MinecraftPacket {
this.id = ProtocolUtils.readVarInt(buf);
this.success = buf.readBoolean();
if (buf.isReadable()) {
this.data = buf.readRetainedSlice(buf.readableBytes());
this.data = buf.readSlice(buf.readableBytes());
} else {
this.data = Unpooled.EMPTY_BUFFER;
}

Datei anzeigen

@ -5,8 +5,8 @@ import com.velocitypowered.proxy.protocol.ProtocolConstants;
import com.velocitypowered.proxy.protocol.ProtocolUtils;
import io.netty.buffer.ByteBuf;
import net.kyori.text.Component;
import net.kyori.text.TextComponent;
import net.kyori.text.serializer.ComponentSerializers;
import org.checkerframework.checker.nullness.qual.Nullable;
import java.util.ArrayList;
import java.util.List;
@ -104,7 +104,7 @@ public class TabCompleteResponse implements MinecraftPacket {
private final String entry;
private final Component tooltip;
public Offer(String entry, Component tooltip) {
public Offer(String entry, @Nullable Component tooltip) {
this.entry = entry;
this.tooltip = tooltip;
}
@ -113,7 +113,7 @@ public class TabCompleteResponse implements MinecraftPacket {
return entry;
}
public Component getTooltip() {
public @Nullable Component getTooltip() {
return tooltip;
}