13
0
geforkt von Mirrors/Velocity

Clean up vestigal stuff

Dieser Commit ist enthalten in:
Andrew Steinborn 2018-09-29 03:32:44 -04:00
Ursprung 97d541d146
Commit 75c3bb5ee6
5 geänderte Dateien mit 3 neuen und 22 gelöschten Zeilen

Datei anzeigen

@ -49,7 +49,7 @@ import java.util.concurrent.CompletableFuture;
public class ConnectedPlayer implements MinecraftConnectionAssociation, Player {
private static final PlainComponentSerializer PASS_THRU_TRANSLATE = new PlainComponentSerializer((c) -> "", TranslatableComponent::key);
public static final PermissionProvider DEFAULT_PERMISSIONS = s -> PermissionFunction.ALWAYS_UNDEFINED;
static final PermissionProvider DEFAULT_PERMISSIONS = s -> PermissionFunction.ALWAYS_UNDEFINED;
private static final Logger logger = LogManager.getLogger(ConnectedPlayer.class);
@ -107,7 +107,7 @@ public class ConnectedPlayer implements MinecraftConnectionAssociation, Player {
return settings == null ? ClientSettingsWrapper.DEFAULT : this.settings;
}
public void setPlayerSettings(ClientSettings settings) {
void setPlayerSettings(ClientSettings settings) {
this.settings = new ClientSettingsWrapper(settings);
server.getEventManager().fireAndForget(new PlayerSettingsChangedEvent(this, this.settings));
}
@ -122,7 +122,7 @@ public class ConnectedPlayer implements MinecraftConnectionAssociation, Player {
return Optional.ofNullable(virtualHost);
}
public void setPermissionFunction(PermissionFunction permissionFunction) {
void setPermissionFunction(PermissionFunction permissionFunction) {
this.permissionFunction = permissionFunction;
}

Datei anzeigen

@ -3,9 +3,6 @@ package com.velocitypowered.proxy.protocol;
import com.google.common.base.Preconditions;
import io.netty.buffer.ByteBuf;
import io.netty.buffer.ByteBufUtil;
import net.kyori.text.Component;
import net.kyori.text.serializer.ComponentSerializer;
import net.kyori.text.serializer.ComponentSerializers;
import java.nio.charset.StandardCharsets;
import java.util.UUID;
@ -82,17 +79,4 @@ public enum ProtocolUtils { ;
buf.writeLong(uuid.getMostSignificantBits());
buf.writeLong(uuid.getLeastSignificantBits());
}
public static Component readScoreboardTextComponent(ByteBuf buf, int protocolVersion) {
String toDeserialize = readString(buf);
ComponentSerializer<Component, ? extends Component, String> serializer =
protocolVersion >= ProtocolConstants.MINECRAFT_1_13 ? ComponentSerializers.JSON : ComponentSerializers.LEGACY;
return serializer.deserialize(toDeserialize);
}
public static void writeScoreboardTextComponent(ByteBuf buf, int protocolVersion, Component component) {
ComponentSerializer<Component, ? extends Component, String> serializer =
protocolVersion >= ProtocolConstants.MINECRAFT_1_13 ? ComponentSerializers.JSON : ComponentSerializers.LEGACY;
writeString(buf, serializer.serialize(component));
}
}

Datei anzeigen

@ -6,7 +6,6 @@ import com.velocitypowered.proxy.protocol.ProtocolConstants;
import com.velocitypowered.proxy.protocol.ProtocolUtils;
import io.netty.buffer.ByteBuf;
import static com.velocitypowered.proxy.protocol.ProtocolConstants.MINECRAFT_1_13;
import static com.velocitypowered.proxy.protocol.ProtocolConstants.MINECRAFT_1_9;
public class TabCompleteRequest implements MinecraftPacket {

Datei anzeigen

@ -1,6 +1,5 @@
package com.velocitypowered.proxy.protocol.packet;
import com.google.common.base.Preconditions;
import com.velocitypowered.proxy.connection.MinecraftSessionHandler;
import com.velocitypowered.proxy.protocol.MinecraftPacket;
import com.velocitypowered.proxy.protocol.ProtocolConstants;

Datei anzeigen

@ -11,7 +11,6 @@ import java.util.ArrayList;
import java.util.Collection;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import java.util.stream.Collectors;
public class VelocityChannelRegistrar implements ChannelRegistrar {
private final Map<String, ChannelIdentifier> identifierMap = new ConcurrentHashMap<>();