geforkt von Mirrors/Velocity
Clean ups around the codebase.
Dieser Commit ist enthalten in:
Ursprung
c7469ec13c
Commit
b5ebb4541f
@ -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;
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren