3
0
Mirror von https://github.com/ViaVersion/ViaVersion.git synchronisiert 2024-11-19 14:30:16 +01:00

Reformat imports

The package rename wasn't done through refactoring but through simple replaces to not make git choke on diffs
Dieser Commit ist enthalten in:
KennyTV 2021-04-27 13:41:39 +02:00
Ursprung 318c49cf30
Commit f1c8d271b1
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 6BE3B555EBC5982B
252 geänderte Dateien mit 535 neuen und 501 gelöschten Zeilen

Datei anzeigen

@ -22,14 +22,14 @@
*/ */
package com.viaversion.viaversion.api; package com.viaversion.viaversion.api;
import com.viaversion.viaversion.api.connection.ConnectionManager;
import io.netty.buffer.ByteBuf;
import com.viaversion.viaversion.api.boss.BossBar; import com.viaversion.viaversion.api.boss.BossBar;
import com.viaversion.viaversion.api.boss.BossColor; import com.viaversion.viaversion.api.boss.BossColor;
import com.viaversion.viaversion.api.boss.BossStyle; import com.viaversion.viaversion.api.boss.BossStyle;
import com.viaversion.viaversion.api.connection.ConnectionManager;
import com.viaversion.viaversion.api.platform.ViaPlatform; import com.viaversion.viaversion.api.platform.ViaPlatform;
import com.viaversion.viaversion.api.protocol.ProtocolManager; import com.viaversion.viaversion.api.protocol.ProtocolManager;
import com.viaversion.viaversion.api.protocol.version.ServerProtocolVersion; import com.viaversion.viaversion.api.protocol.version.ServerProtocolVersion;
import io.netty.buffer.ByteBuf;
import java.util.SortedSet; import java.util.SortedSet;
import java.util.UUID; import java.util.UUID;

Datei anzeigen

@ -23,12 +23,12 @@
package com.viaversion.viaversion.api; package com.viaversion.viaversion.api;
import com.viaversion.viaversion.api.command.ViaVersionCommand; import com.viaversion.viaversion.api.command.ViaVersionCommand;
import com.viaversion.viaversion.api.connection.ConnectionManager;
import com.viaversion.viaversion.api.platform.ViaInjector; import com.viaversion.viaversion.api.platform.ViaInjector;
import com.viaversion.viaversion.api.platform.ViaPlatform; import com.viaversion.viaversion.api.platform.ViaPlatform;
import com.viaversion.viaversion.api.platform.ViaPlatformLoader; import com.viaversion.viaversion.api.platform.ViaPlatformLoader;
import com.viaversion.viaversion.api.platform.providers.ViaProviders; import com.viaversion.viaversion.api.platform.providers.ViaProviders;
import com.viaversion.viaversion.api.protocol.ProtocolManager; import com.viaversion.viaversion.api.protocol.ProtocolManager;
import com.viaversion.viaversion.api.connection.ConnectionManager;
import java.util.Set; import java.util.Set;

Datei anzeigen

@ -78,7 +78,7 @@ public interface ViaVersionConfig {
/** /**
* Whether the player can block with the shield without a delay. * Whether the player can block with the shield without a delay.
* * <p>
* This option requires {@link #isShowShieldWhenSwordInHand()} to be disabled * This option requires {@link #isShowShieldWhenSwordInHand()} to be disabled
* *
* @return {@code true} if non delayed shield blocking is enabled. * @return {@code true} if non delayed shield blocking is enabled.
@ -88,7 +88,7 @@ public interface ViaVersionConfig {
/** /**
* Puts the shield into the second hand when holding a sword. * Puts the shield into the second hand when holding a sword.
* The shield will disappear when switching to another item. * The shield will disappear when switching to another item.
* * <p>
* This option requires {@link #isShieldBlocking()} to be enabled * This option requires {@link #isShieldBlocking()} to be enabled
* *
* @return {@code true} if the shield should appear when holding a sword * @return {@code true} if the shield should appear when holding a sword

Datei anzeigen

@ -24,7 +24,6 @@ package com.viaversion.viaversion.api.protocol.base;
import com.viaversion.viaversion.api.connection.UserConnection; import com.viaversion.viaversion.api.connection.UserConnection;
import com.viaversion.viaversion.api.data.MappingData; import com.viaversion.viaversion.api.data.MappingData;
import com.viaversion.viaversion.api.data.MappingDataBase;
import com.viaversion.viaversion.api.platform.providers.ViaProviders; import com.viaversion.viaversion.api.platform.providers.ViaProviders;
import com.viaversion.viaversion.api.protocol.AbstractSimpleProtocol; import com.viaversion.viaversion.api.protocol.AbstractSimpleProtocol;
import com.viaversion.viaversion.api.protocol.packet.ClientboundPacketType; import com.viaversion.viaversion.api.protocol.packet.ClientboundPacketType;

Datei anzeigen

@ -22,10 +22,10 @@
*/ */
package com.viaversion.viaversion.api.protocol.packet; package com.viaversion.viaversion.api.protocol.packet;
import com.viaversion.viaversion.api.connection.UserConnection;
import org.checkerframework.checker.nullness.qual.Nullable;
import com.viaversion.viaversion.api.Via; import com.viaversion.viaversion.api.Via;
import com.viaversion.viaversion.api.configuration.ViaVersionConfig; import com.viaversion.viaversion.api.configuration.ViaVersionConfig;
import com.viaversion.viaversion.api.connection.UserConnection;
import org.checkerframework.checker.nullness.qual.Nullable;
public class PacketTracker { public class PacketTracker {
private final UserConnection connection; private final UserConnection connection;

Datei anzeigen

@ -22,10 +22,10 @@
*/ */
package com.viaversion.viaversion.api.protocol.remapper; package com.viaversion.viaversion.api.protocol.remapper;
import org.checkerframework.checker.nullness.qual.Nullable;
import com.viaversion.viaversion.api.protocol.packet.PacketWrapper; import com.viaversion.viaversion.api.protocol.packet.PacketWrapper;
import com.viaversion.viaversion.api.type.Type; import com.viaversion.viaversion.api.type.Type;
import com.viaversion.viaversion.exception.InformativeException; import com.viaversion.viaversion.exception.InformativeException;
import org.checkerframework.checker.nullness.qual.Nullable;
public abstract class ValueTransformer<T1, T2> implements ValueWriter<T1> { public abstract class ValueTransformer<T1, T2> implements ValueWriter<T1> {
private final Type<T1> inputType; private final Type<T1> inputType;

Datei anzeigen

@ -22,8 +22,8 @@
*/ */
package com.viaversion.viaversion.api.type.types; package com.viaversion.viaversion.api.type.types;
import io.netty.buffer.ByteBuf;
import com.viaversion.viaversion.api.type.Type; import com.viaversion.viaversion.api.type.Type;
import io.netty.buffer.ByteBuf;
import java.lang.reflect.Array; import java.lang.reflect.Array;

Datei anzeigen

@ -22,9 +22,9 @@
*/ */
package com.viaversion.viaversion.api.type.types; package com.viaversion.viaversion.api.type.types;
import io.netty.buffer.ByteBuf;
import com.viaversion.viaversion.api.type.Type; import com.viaversion.viaversion.api.type.Type;
import com.viaversion.viaversion.api.type.TypeConverter; import com.viaversion.viaversion.api.type.TypeConverter;
import io.netty.buffer.ByteBuf;
public class BooleanType extends Type<Boolean> implements TypeConverter<Boolean> { public class BooleanType extends Type<Boolean> implements TypeConverter<Boolean> {
public BooleanType() { public BooleanType() {

Datei anzeigen

@ -23,8 +23,8 @@
package com.viaversion.viaversion.api.type.types; package com.viaversion.viaversion.api.type.types;
import com.google.common.base.Preconditions; import com.google.common.base.Preconditions;
import io.netty.buffer.ByteBuf;
import com.viaversion.viaversion.api.type.Type; import com.viaversion.viaversion.api.type.Type;
import io.netty.buffer.ByteBuf;
public class ByteArrayType extends Type<byte[]> { public class ByteArrayType extends Type<byte[]> {
public ByteArrayType() { public ByteArrayType() {

Datei anzeigen

@ -22,9 +22,9 @@
*/ */
package com.viaversion.viaversion.api.type.types; package com.viaversion.viaversion.api.type.types;
import io.netty.buffer.ByteBuf;
import com.viaversion.viaversion.api.type.Type; import com.viaversion.viaversion.api.type.Type;
import com.viaversion.viaversion.api.type.TypeConverter; import com.viaversion.viaversion.api.type.TypeConverter;
import io.netty.buffer.ByteBuf;
public class ByteType extends Type<Byte> implements TypeConverter<Byte> { public class ByteType extends Type<Byte> implements TypeConverter<Byte> {
public ByteType() { public ByteType() {

Datei anzeigen

@ -25,9 +25,9 @@ package com.viaversion.viaversion.api.type.types;
import com.google.gson.JsonElement; import com.google.gson.JsonElement;
import com.google.gson.JsonParser; import com.google.gson.JsonParser;
import com.google.gson.JsonSyntaxException; import com.google.gson.JsonSyntaxException;
import io.netty.buffer.ByteBuf;
import com.viaversion.viaversion.api.Via; import com.viaversion.viaversion.api.Via;
import com.viaversion.viaversion.api.type.Type; import com.viaversion.viaversion.api.type.Type;
import io.netty.buffer.ByteBuf;
public class ComponentType extends Type<JsonElement> { public class ComponentType extends Type<JsonElement> {
private static final StringType STRING_TAG = new StringType(262144); private static final StringType STRING_TAG = new StringType(262144);

Datei anzeigen

@ -22,8 +22,8 @@
*/ */
package com.viaversion.viaversion.api.type.types; package com.viaversion.viaversion.api.type.types;
import io.netty.buffer.ByteBuf;
import com.viaversion.viaversion.api.type.PartialType; import com.viaversion.viaversion.api.type.PartialType;
import io.netty.buffer.ByteBuf;
public class CustomByteType extends PartialType<byte[], Integer> { public class CustomByteType extends PartialType<byte[], Integer> {

Datei anzeigen

@ -22,9 +22,9 @@
*/ */
package com.viaversion.viaversion.api.type.types; package com.viaversion.viaversion.api.type.types;
import io.netty.buffer.ByteBuf;
import com.viaversion.viaversion.api.type.Type; import com.viaversion.viaversion.api.type.Type;
import com.viaversion.viaversion.api.type.TypeConverter; import com.viaversion.viaversion.api.type.TypeConverter;
import io.netty.buffer.ByteBuf;
public class DoubleType extends Type<Double> implements TypeConverter<Double> { public class DoubleType extends Type<Double> implements TypeConverter<Double> {

Datei anzeigen

@ -22,9 +22,9 @@
*/ */
package com.viaversion.viaversion.api.type.types; package com.viaversion.viaversion.api.type.types;
import io.netty.buffer.ByteBuf;
import com.viaversion.viaversion.api.type.Type; import com.viaversion.viaversion.api.type.Type;
import com.viaversion.viaversion.api.type.TypeConverter; import com.viaversion.viaversion.api.type.TypeConverter;
import io.netty.buffer.ByteBuf;
public class FloatType extends Type<Float> implements TypeConverter<Float> { public class FloatType extends Type<Float> implements TypeConverter<Float> {

Datei anzeigen

@ -22,9 +22,9 @@
*/ */
package com.viaversion.viaversion.api.type.types; package com.viaversion.viaversion.api.type.types;
import io.netty.buffer.ByteBuf;
import com.viaversion.viaversion.api.type.Type; import com.viaversion.viaversion.api.type.Type;
import com.viaversion.viaversion.api.type.TypeConverter; import com.viaversion.viaversion.api.type.TypeConverter;
import io.netty.buffer.ByteBuf;
public class IntType extends Type<Integer> implements TypeConverter<Integer> { public class IntType extends Type<Integer> implements TypeConverter<Integer> {
public IntType() { public IntType() {

Datei anzeigen

@ -22,8 +22,8 @@
*/ */
package com.viaversion.viaversion.api.type.types; package com.viaversion.viaversion.api.type.types;
import io.netty.buffer.ByteBuf;
import com.viaversion.viaversion.api.type.Type; import com.viaversion.viaversion.api.type.Type;
import io.netty.buffer.ByteBuf;
public class LongArrayType extends Type<long[]> { public class LongArrayType extends Type<long[]> {

Datei anzeigen

@ -22,9 +22,9 @@
*/ */
package com.viaversion.viaversion.api.type.types; package com.viaversion.viaversion.api.type.types;
import io.netty.buffer.ByteBuf;
import com.viaversion.viaversion.api.type.Type; import com.viaversion.viaversion.api.type.Type;
import com.viaversion.viaversion.api.type.TypeConverter; import com.viaversion.viaversion.api.type.TypeConverter;
import io.netty.buffer.ByteBuf;
public class LongType extends Type<Long> implements TypeConverter<Long> { public class LongType extends Type<Long> implements TypeConverter<Long> {

Datei anzeigen

@ -22,8 +22,8 @@
*/ */
package com.viaversion.viaversion.api.type.types; package com.viaversion.viaversion.api.type.types;
import io.netty.buffer.ByteBuf;
import com.viaversion.viaversion.api.type.Type; import com.viaversion.viaversion.api.type.Type;
import io.netty.buffer.ByteBuf;
public class RemainingBytesType extends Type<byte[]> { public class RemainingBytesType extends Type<byte[]> {
public RemainingBytesType() { public RemainingBytesType() {

Datei anzeigen

@ -1,7 +1,7 @@
package com.viaversion.viaversion.api.type.types; package com.viaversion.viaversion.api.type.types;
import io.netty.buffer.ByteBuf;
import com.viaversion.viaversion.api.type.Type; import com.viaversion.viaversion.api.type.Type;
import io.netty.buffer.ByteBuf;
/** /**
* Byte array with a short prefix, used in 1.7 * Byte array with a short prefix, used in 1.7

Datei anzeigen

@ -22,9 +22,9 @@
*/ */
package com.viaversion.viaversion.api.type.types; package com.viaversion.viaversion.api.type.types;
import io.netty.buffer.ByteBuf;
import com.viaversion.viaversion.api.type.Type; import com.viaversion.viaversion.api.type.Type;
import com.viaversion.viaversion.api.type.TypeConverter; import com.viaversion.viaversion.api.type.TypeConverter;
import io.netty.buffer.ByteBuf;
public class ShortType extends Type<Short> implements TypeConverter<Short> { public class ShortType extends Type<Short> implements TypeConverter<Short> {

Datei anzeigen

@ -23,8 +23,8 @@
package com.viaversion.viaversion.api.type.types; package com.viaversion.viaversion.api.type.types;
import com.google.common.base.Preconditions; import com.google.common.base.Preconditions;
import io.netty.buffer.ByteBuf;
import com.viaversion.viaversion.api.type.Type; import com.viaversion.viaversion.api.type.Type;
import io.netty.buffer.ByteBuf;
import java.nio.charset.StandardCharsets; import java.nio.charset.StandardCharsets;

Datei anzeigen

@ -22,8 +22,8 @@
*/ */
package com.viaversion.viaversion.api.type.types; package com.viaversion.viaversion.api.type.types;
import io.netty.buffer.ByteBuf;
import com.viaversion.viaversion.api.type.Type; import com.viaversion.viaversion.api.type.Type;
import io.netty.buffer.ByteBuf;
import java.util.UUID; import java.util.UUID;

Datei anzeigen

@ -22,8 +22,8 @@
*/ */
package com.viaversion.viaversion.api.type.types; package com.viaversion.viaversion.api.type.types;
import io.netty.buffer.ByteBuf;
import com.viaversion.viaversion.api.type.Type; import com.viaversion.viaversion.api.type.Type;
import io.netty.buffer.ByteBuf;
import java.util.UUID; import java.util.UUID;

Datei anzeigen

@ -22,9 +22,9 @@
*/ */
package com.viaversion.viaversion.api.type.types; package com.viaversion.viaversion.api.type.types;
import io.netty.buffer.ByteBuf;
import com.viaversion.viaversion.api.type.Type; import com.viaversion.viaversion.api.type.Type;
import com.viaversion.viaversion.api.type.TypeConverter; import com.viaversion.viaversion.api.type.TypeConverter;
import io.netty.buffer.ByteBuf;
public class UnsignedByteType extends Type<Short> implements TypeConverter<Short> { public class UnsignedByteType extends Type<Short> implements TypeConverter<Short> {
public UnsignedByteType() { public UnsignedByteType() {

Datei anzeigen

@ -22,9 +22,9 @@
*/ */
package com.viaversion.viaversion.api.type.types; package com.viaversion.viaversion.api.type.types;
import io.netty.buffer.ByteBuf;
import com.viaversion.viaversion.api.type.Type; import com.viaversion.viaversion.api.type.Type;
import com.viaversion.viaversion.api.type.TypeConverter; import com.viaversion.viaversion.api.type.TypeConverter;
import io.netty.buffer.ByteBuf;
public class UnsignedShortType extends Type<Integer> implements TypeConverter<Integer> { public class UnsignedShortType extends Type<Integer> implements TypeConverter<Integer> {
public UnsignedShortType() { public UnsignedShortType() {

Datei anzeigen

@ -23,8 +23,8 @@
package com.viaversion.viaversion.api.type.types; package com.viaversion.viaversion.api.type.types;
import com.google.common.base.Preconditions; import com.google.common.base.Preconditions;
import io.netty.buffer.ByteBuf;
import com.viaversion.viaversion.api.type.Type; import com.viaversion.viaversion.api.type.Type;
import io.netty.buffer.ByteBuf;
public class VarIntArrayType extends Type<int[]> { public class VarIntArrayType extends Type<int[]> {
public VarIntArrayType() { public VarIntArrayType() {

Datei anzeigen

@ -22,9 +22,9 @@
*/ */
package com.viaversion.viaversion.api.type.types; package com.viaversion.viaversion.api.type.types;
import io.netty.buffer.ByteBuf;
import com.viaversion.viaversion.api.type.Type; import com.viaversion.viaversion.api.type.Type;
import com.viaversion.viaversion.api.type.TypeConverter; import com.viaversion.viaversion.api.type.TypeConverter;
import io.netty.buffer.ByteBuf;
public class VarIntType extends Type<Integer> implements TypeConverter<Integer> { public class VarIntType extends Type<Integer> implements TypeConverter<Integer> {

Datei anzeigen

@ -22,9 +22,9 @@
*/ */
package com.viaversion.viaversion.api.type.types; package com.viaversion.viaversion.api.type.types;
import io.netty.buffer.ByteBuf;
import com.viaversion.viaversion.api.type.Type; import com.viaversion.viaversion.api.type.Type;
import com.viaversion.viaversion.api.type.TypeConverter; import com.viaversion.viaversion.api.type.TypeConverter;
import io.netty.buffer.ByteBuf;
public class VarLongType extends Type<Long> implements TypeConverter<Long> { public class VarLongType extends Type<Long> implements TypeConverter<Long> {

Datei anzeigen

@ -22,9 +22,9 @@
*/ */
package com.viaversion.viaversion.api.type.types; package com.viaversion.viaversion.api.type.types;
import io.netty.buffer.ByteBuf;
import com.viaversion.viaversion.api.type.Type; import com.viaversion.viaversion.api.type.Type;
import com.viaversion.viaversion.api.type.TypeConverter; import com.viaversion.viaversion.api.type.TypeConverter;
import io.netty.buffer.ByteBuf;
public class VoidType extends Type<Void> implements TypeConverter<Void> { public class VoidType extends Type<Void> implements TypeConverter<Void> {
public VoidType() { public VoidType() {

Datei anzeigen

@ -22,9 +22,9 @@
*/ */
package com.viaversion.viaversion.api.type.types.minecraft; package com.viaversion.viaversion.api.type.types.minecraft;
import io.netty.buffer.ByteBuf;
import com.viaversion.viaversion.api.minecraft.metadata.Metadata; import com.viaversion.viaversion.api.minecraft.metadata.Metadata;
import com.viaversion.viaversion.api.type.Type; import com.viaversion.viaversion.api.type.Type;
import io.netty.buffer.ByteBuf;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;

Datei anzeigen

@ -22,10 +22,10 @@
*/ */
package com.viaversion.viaversion.api.type.types.minecraft; package com.viaversion.viaversion.api.type.types.minecraft;
import io.netty.buffer.ByteBuf;
import com.viaversion.viaversion.api.minecraft.BlockChangeRecord; import com.viaversion.viaversion.api.minecraft.BlockChangeRecord;
import com.viaversion.viaversion.api.minecraft.BlockChangeRecord1_8; import com.viaversion.viaversion.api.minecraft.BlockChangeRecord1_8;
import com.viaversion.viaversion.api.type.Type; import com.viaversion.viaversion.api.type.Type;
import io.netty.buffer.ByteBuf;
public class BlockChangeRecordType extends Type<BlockChangeRecord> { public class BlockChangeRecordType extends Type<BlockChangeRecord> {

Datei anzeigen

@ -22,9 +22,9 @@
*/ */
package com.viaversion.viaversion.api.type.types.minecraft; package com.viaversion.viaversion.api.type.types.minecraft;
import io.netty.buffer.ByteBuf;
import com.viaversion.viaversion.api.minecraft.EulerAngle; import com.viaversion.viaversion.api.minecraft.EulerAngle;
import com.viaversion.viaversion.api.type.Type; import com.viaversion.viaversion.api.type.Type;
import io.netty.buffer.ByteBuf;
public class EulerAngleType extends Type<EulerAngle> { public class EulerAngleType extends Type<EulerAngle> {
public EulerAngleType() { public EulerAngleType() {

Datei anzeigen

@ -22,9 +22,9 @@
*/ */
package com.viaversion.viaversion.api.type.types.minecraft; package com.viaversion.viaversion.api.type.types.minecraft;
import io.netty.buffer.ByteBuf;
import com.viaversion.viaversion.api.minecraft.item.Item; import com.viaversion.viaversion.api.minecraft.item.Item;
import com.viaversion.viaversion.api.type.Type; import com.viaversion.viaversion.api.type.Type;
import io.netty.buffer.ByteBuf;
public class FlatItemArrayType extends BaseItemArrayType { public class FlatItemArrayType extends BaseItemArrayType {

Datei anzeigen

@ -22,9 +22,9 @@
*/ */
package com.viaversion.viaversion.api.type.types.minecraft; package com.viaversion.viaversion.api.type.types.minecraft;
import io.netty.buffer.ByteBuf;
import com.viaversion.viaversion.api.minecraft.item.Item; import com.viaversion.viaversion.api.minecraft.item.Item;
import com.viaversion.viaversion.api.type.Type; import com.viaversion.viaversion.api.type.Type;
import io.netty.buffer.ByteBuf;
public class FlatItemType extends BaseItemType { public class FlatItemType extends BaseItemType {
public FlatItemType() { public FlatItemType() {

Datei anzeigen

@ -22,8 +22,8 @@
*/ */
package com.viaversion.viaversion.api.type.types.minecraft; package com.viaversion.viaversion.api.type.types.minecraft;
import io.netty.buffer.ByteBuf;
import com.viaversion.viaversion.api.minecraft.item.Item; import com.viaversion.viaversion.api.minecraft.item.Item;
import io.netty.buffer.ByteBuf;
public class FlatVarIntItemArrayType extends BaseItemArrayType { public class FlatVarIntItemArrayType extends BaseItemArrayType {

Datei anzeigen

@ -22,8 +22,8 @@
*/ */
package com.viaversion.viaversion.api.type.types.minecraft; package com.viaversion.viaversion.api.type.types.minecraft;
import io.netty.buffer.ByteBuf;
import com.viaversion.viaversion.api.minecraft.item.Item; import com.viaversion.viaversion.api.minecraft.item.Item;
import io.netty.buffer.ByteBuf;
public class FlatVarIntItemType extends BaseItemType { public class FlatVarIntItemType extends BaseItemType {
public FlatVarIntItemType() { public FlatVarIntItemType() {

Datei anzeigen

@ -22,8 +22,8 @@
*/ */
package com.viaversion.viaversion.api.type.types.minecraft; package com.viaversion.viaversion.api.type.types.minecraft;
import io.netty.buffer.ByteBuf;
import com.viaversion.viaversion.api.minecraft.item.Item; import com.viaversion.viaversion.api.minecraft.item.Item;
import io.netty.buffer.ByteBuf;
public class ItemArrayType extends BaseItemArrayType { public class ItemArrayType extends BaseItemArrayType {

Datei anzeigen

@ -22,8 +22,8 @@
*/ */
package com.viaversion.viaversion.api.type.types.minecraft; package com.viaversion.viaversion.api.type.types.minecraft;
import io.netty.buffer.ByteBuf;
import com.viaversion.viaversion.api.minecraft.item.Item; import com.viaversion.viaversion.api.minecraft.item.Item;
import io.netty.buffer.ByteBuf;
public class ItemType extends BaseItemType { public class ItemType extends BaseItemType {
public ItemType() { public ItemType() {

Datei anzeigen

@ -22,9 +22,9 @@
*/ */
package com.viaversion.viaversion.api.type.types.minecraft; package com.viaversion.viaversion.api.type.types.minecraft;
import io.netty.buffer.ByteBuf;
import com.viaversion.viaversion.api.minecraft.metadata.Metadata; import com.viaversion.viaversion.api.minecraft.metadata.Metadata;
import com.viaversion.viaversion.api.type.Type; import com.viaversion.viaversion.api.type.Type;
import io.netty.buffer.ByteBuf;
public abstract class ModernMetaListType extends AbstractMetaListType { public abstract class ModernMetaListType extends AbstractMetaListType {

Datei anzeigen

@ -22,9 +22,9 @@
*/ */
package com.viaversion.viaversion.api.type.types.minecraft; package com.viaversion.viaversion.api.type.types.minecraft;
import io.netty.buffer.ByteBuf;
import com.viaversion.viaversion.api.minecraft.metadata.MetaType; import com.viaversion.viaversion.api.minecraft.metadata.MetaType;
import com.viaversion.viaversion.api.minecraft.metadata.Metadata; import com.viaversion.viaversion.api.minecraft.metadata.Metadata;
import io.netty.buffer.ByteBuf;
public abstract class ModernMetaType extends MetaTypeTemplate { public abstract class ModernMetaType extends MetaTypeTemplate {
@Override @Override

Datei anzeigen

@ -25,10 +25,10 @@ package com.viaversion.viaversion.api.type.types.minecraft;
import com.github.steveice10.opennbt.NBTIO; import com.github.steveice10.opennbt.NBTIO;
import com.github.steveice10.opennbt.tag.builtin.CompoundTag; import com.github.steveice10.opennbt.tag.builtin.CompoundTag;
import com.google.common.base.Preconditions; import com.google.common.base.Preconditions;
import com.viaversion.viaversion.api.type.Type;
import io.netty.buffer.ByteBuf; import io.netty.buffer.ByteBuf;
import io.netty.buffer.ByteBufInputStream; import io.netty.buffer.ByteBufInputStream;
import io.netty.buffer.ByteBufOutputStream; import io.netty.buffer.ByteBufOutputStream;
import com.viaversion.viaversion.api.type.Type;
import java.io.DataInput; import java.io.DataInput;
import java.io.DataOutput; import java.io.DataOutput;

Datei anzeigen

@ -22,9 +22,9 @@
*/ */
package com.viaversion.viaversion.api.type.types.minecraft; package com.viaversion.viaversion.api.type.types.minecraft;
import io.netty.buffer.ByteBuf;
import com.viaversion.viaversion.api.minecraft.Position; import com.viaversion.viaversion.api.minecraft.Position;
import com.viaversion.viaversion.api.type.Type; import com.viaversion.viaversion.api.type.Type;
import io.netty.buffer.ByteBuf;
public class OptPosition1_14Type extends Type<Position> { public class OptPosition1_14Type extends Type<Position> {
public OptPosition1_14Type() { public OptPosition1_14Type() {

Datei anzeigen

@ -22,9 +22,9 @@
*/ */
package com.viaversion.viaversion.api.type.types.minecraft; package com.viaversion.viaversion.api.type.types.minecraft;
import io.netty.buffer.ByteBuf;
import com.viaversion.viaversion.api.minecraft.Position; import com.viaversion.viaversion.api.minecraft.Position;
import com.viaversion.viaversion.api.type.Type; import com.viaversion.viaversion.api.type.Type;
import io.netty.buffer.ByteBuf;
public class OptPositionType extends Type<Position> { public class OptPositionType extends Type<Position> {
public OptPositionType() { public OptPositionType() {

Datei anzeigen

@ -22,8 +22,8 @@
*/ */
package com.viaversion.viaversion.api.type.types.minecraft; package com.viaversion.viaversion.api.type.types.minecraft;
import io.netty.buffer.ByteBuf;
import com.viaversion.viaversion.api.type.Type; import com.viaversion.viaversion.api.type.Type;
import io.netty.buffer.ByteBuf;
import java.util.UUID; import java.util.UUID;

Datei anzeigen

@ -23,8 +23,8 @@
package com.viaversion.viaversion.api.type.types.minecraft; package com.viaversion.viaversion.api.type.types.minecraft;
import com.google.gson.JsonElement; import com.google.gson.JsonElement;
import io.netty.buffer.ByteBuf;
import com.viaversion.viaversion.api.type.Type; import com.viaversion.viaversion.api.type.Type;
import io.netty.buffer.ByteBuf;
public class OptionalComponentType extends Type<JsonElement> { public class OptionalComponentType extends Type<JsonElement> {

Datei anzeigen

@ -22,8 +22,8 @@
*/ */
package com.viaversion.viaversion.api.type.types.minecraft; package com.viaversion.viaversion.api.type.types.minecraft;
import io.netty.buffer.ByteBuf;
import com.viaversion.viaversion.api.type.Type; import com.viaversion.viaversion.api.type.Type;
import io.netty.buffer.ByteBuf;
public class OptionalVarIntType extends Type<Integer> { public class OptionalVarIntType extends Type<Integer> {
public OptionalVarIntType() { public OptionalVarIntType() {

Datei anzeigen

@ -22,9 +22,9 @@
*/ */
package com.viaversion.viaversion.api.type.types.minecraft; package com.viaversion.viaversion.api.type.types.minecraft;
import io.netty.buffer.ByteBuf;
import com.viaversion.viaversion.api.type.Type; import com.viaversion.viaversion.api.type.Type;
import com.viaversion.viaversion.api.type.types.Particle; import com.viaversion.viaversion.api.type.types.Particle;
import io.netty.buffer.ByteBuf;
public class Particle1_13Type extends Type<Particle> { public class Particle1_13Type extends Type<Particle> {

Datei anzeigen

@ -22,9 +22,9 @@
*/ */
package com.viaversion.viaversion.api.type.types.minecraft; package com.viaversion.viaversion.api.type.types.minecraft;
import io.netty.buffer.ByteBuf;
import com.viaversion.viaversion.api.type.Type; import com.viaversion.viaversion.api.type.Type;
import com.viaversion.viaversion.api.type.types.Particle; import com.viaversion.viaversion.api.type.types.Particle;
import io.netty.buffer.ByteBuf;
public class Particle1_13_2Type extends Type<Particle> { public class Particle1_13_2Type extends Type<Particle> {

Datei anzeigen

@ -22,9 +22,9 @@
*/ */
package com.viaversion.viaversion.api.type.types.minecraft; package com.viaversion.viaversion.api.type.types.minecraft;
import io.netty.buffer.ByteBuf;
import com.viaversion.viaversion.api.type.Type; import com.viaversion.viaversion.api.type.Type;
import com.viaversion.viaversion.api.type.types.Particle; import com.viaversion.viaversion.api.type.types.Particle;
import io.netty.buffer.ByteBuf;
public class Particle1_14Type extends Type<Particle> { public class Particle1_14Type extends Type<Particle> {

Datei anzeigen

@ -22,10 +22,10 @@
*/ */
package com.viaversion.viaversion.api.type.types.minecraft; package com.viaversion.viaversion.api.type.types.minecraft;
import io.netty.buffer.ByteBuf;
import com.viaversion.viaversion.api.Via; import com.viaversion.viaversion.api.Via;
import com.viaversion.viaversion.api.type.Type; import com.viaversion.viaversion.api.type.Type;
import com.viaversion.viaversion.api.type.types.Particle; import com.viaversion.viaversion.api.type.types.Particle;
import io.netty.buffer.ByteBuf;
public class Particle1_17Type extends Type<Particle> { public class Particle1_17Type extends Type<Particle> {

Datei anzeigen

@ -22,9 +22,9 @@
*/ */
package com.viaversion.viaversion.api.type.types.minecraft; package com.viaversion.viaversion.api.type.types.minecraft;
import io.netty.buffer.ByteBuf;
import com.viaversion.viaversion.api.minecraft.Position; import com.viaversion.viaversion.api.minecraft.Position;
import com.viaversion.viaversion.api.type.Type; import com.viaversion.viaversion.api.type.Type;
import io.netty.buffer.ByteBuf;
public class Position1_14Type extends Type<Position> { public class Position1_14Type extends Type<Position> {
public Position1_14Type() { public Position1_14Type() {

Datei anzeigen

@ -22,9 +22,9 @@
*/ */
package com.viaversion.viaversion.api.type.types.minecraft; package com.viaversion.viaversion.api.type.types.minecraft;
import io.netty.buffer.ByteBuf;
import com.viaversion.viaversion.api.minecraft.Position; import com.viaversion.viaversion.api.minecraft.Position;
import com.viaversion.viaversion.api.type.Type; import com.viaversion.viaversion.api.type.Type;
import io.netty.buffer.ByteBuf;
public class PositionType extends Type<Position> { public class PositionType extends Type<Position> {
public PositionType() { public PositionType() {

Datei anzeigen

@ -22,10 +22,10 @@
*/ */
package com.viaversion.viaversion.api.type.types.minecraft; package com.viaversion.viaversion.api.type.types.minecraft;
import io.netty.buffer.ByteBuf;
import com.viaversion.viaversion.api.minecraft.BlockChangeRecord; import com.viaversion.viaversion.api.minecraft.BlockChangeRecord;
import com.viaversion.viaversion.api.minecraft.BlockChangeRecord1_16_2; import com.viaversion.viaversion.api.minecraft.BlockChangeRecord1_16_2;
import com.viaversion.viaversion.api.type.Type; import com.viaversion.viaversion.api.type.Type;
import io.netty.buffer.ByteBuf;
public class VarLongBlockChangeRecordType extends Type<BlockChangeRecord> { public class VarLongBlockChangeRecordType extends Type<BlockChangeRecord> {

Datei anzeigen

@ -22,9 +22,9 @@
*/ */
package com.viaversion.viaversion.api.type.types.minecraft; package com.viaversion.viaversion.api.type.types.minecraft;
import io.netty.buffer.ByteBuf;
import com.viaversion.viaversion.api.minecraft.Vector; import com.viaversion.viaversion.api.minecraft.Vector;
import com.viaversion.viaversion.api.type.Type; import com.viaversion.viaversion.api.type.Type;
import io.netty.buffer.ByteBuf;
public class VectorType extends Type<Vector> { public class VectorType extends Type<Vector> {
public VectorType() { public VectorType() {

Datei anzeigen

@ -22,9 +22,9 @@
*/ */
package com.viaversion.viaversion.api.type.types.minecraft; package com.viaversion.viaversion.api.type.types.minecraft;
import io.netty.buffer.ByteBuf;
import com.viaversion.viaversion.api.minecraft.VillagerData; import com.viaversion.viaversion.api.minecraft.VillagerData;
import com.viaversion.viaversion.api.type.Type; import com.viaversion.viaversion.api.type.Type;
import io.netty.buffer.ByteBuf;
public class VillagerDataType extends Type<VillagerData> { public class VillagerDataType extends Type<VillagerData> {
public VillagerDataType() { public VillagerDataType() {

Datei anzeigen

@ -22,10 +22,10 @@
*/ */
package com.viaversion.viaversion.api.type.types.version; package com.viaversion.viaversion.api.type.types.version;
import io.netty.buffer.ByteBuf;
import com.viaversion.viaversion.api.minecraft.chunks.ChunkSection; import com.viaversion.viaversion.api.minecraft.chunks.ChunkSection;
import com.viaversion.viaversion.api.type.Type; import com.viaversion.viaversion.api.type.Type;
import com.viaversion.viaversion.util.CompactArrayUtil; import com.viaversion.viaversion.util.CompactArrayUtil;
import io.netty.buffer.ByteBuf;
public class ChunkSectionType1_13 extends Type<ChunkSection> { public class ChunkSectionType1_13 extends Type<ChunkSection> {
private static final int GLOBAL_PALETTE = 14; private static final int GLOBAL_PALETTE = 14;

Datei anzeigen

@ -22,10 +22,10 @@
*/ */
package com.viaversion.viaversion.api.type.types.version; package com.viaversion.viaversion.api.type.types.version;
import io.netty.buffer.ByteBuf;
import com.viaversion.viaversion.api.minecraft.chunks.ChunkSection; import com.viaversion.viaversion.api.minecraft.chunks.ChunkSection;
import com.viaversion.viaversion.api.type.Type; import com.viaversion.viaversion.api.type.Type;
import com.viaversion.viaversion.util.CompactArrayUtil; import com.viaversion.viaversion.util.CompactArrayUtil;
import io.netty.buffer.ByteBuf;
public class ChunkSectionType1_16 extends Type<ChunkSection> { public class ChunkSectionType1_16 extends Type<ChunkSection> {
private static final int GLOBAL_PALETTE = 15; private static final int GLOBAL_PALETTE = 15;

Datei anzeigen

@ -22,9 +22,9 @@
*/ */
package com.viaversion.viaversion.api.type.types.version; package com.viaversion.viaversion.api.type.types.version;
import io.netty.buffer.ByteBuf;
import com.viaversion.viaversion.api.minecraft.chunks.ChunkSection; import com.viaversion.viaversion.api.minecraft.chunks.ChunkSection;
import com.viaversion.viaversion.api.type.Type; import com.viaversion.viaversion.api.type.Type;
import io.netty.buffer.ByteBuf;
import java.nio.ByteOrder; import java.nio.ByteOrder;

Datei anzeigen

@ -22,10 +22,10 @@
*/ */
package com.viaversion.viaversion.api.type.types.version; package com.viaversion.viaversion.api.type.types.version;
import io.netty.buffer.ByteBuf;
import com.viaversion.viaversion.api.minecraft.chunks.ChunkSection; import com.viaversion.viaversion.api.minecraft.chunks.ChunkSection;
import com.viaversion.viaversion.api.type.Type; import com.viaversion.viaversion.api.type.Type;
import com.viaversion.viaversion.util.CompactArrayUtil; import com.viaversion.viaversion.util.CompactArrayUtil;
import io.netty.buffer.ByteBuf;
public class ChunkSectionType1_9 extends Type<ChunkSection> { public class ChunkSectionType1_9 extends Type<ChunkSection> {
private static final int GLOBAL_PALETTE = 13; private static final int GLOBAL_PALETTE = 13;

Datei anzeigen

@ -23,10 +23,10 @@
package com.viaversion.viaversion.api.type.types.version; package com.viaversion.viaversion.api.type.types.version;
import io.netty.buffer.ByteBuf;
import com.viaversion.viaversion.api.minecraft.metadata.Metadata; import com.viaversion.viaversion.api.minecraft.metadata.Metadata;
import com.viaversion.viaversion.api.minecraft.metadata.types.MetaType1_8; import com.viaversion.viaversion.api.minecraft.metadata.types.MetaType1_8;
import com.viaversion.viaversion.api.type.types.minecraft.MetaTypeTemplate; import com.viaversion.viaversion.api.type.types.minecraft.MetaTypeTemplate;
import io.netty.buffer.ByteBuf;
public class Metadata1_8Type extends MetaTypeTemplate { public class Metadata1_8Type extends MetaTypeTemplate {

Datei anzeigen

@ -22,10 +22,10 @@
*/ */
package com.viaversion.viaversion.api.type.types.version; package com.viaversion.viaversion.api.type.types.version;
import io.netty.buffer.ByteBuf;
import com.viaversion.viaversion.api.minecraft.metadata.Metadata; import com.viaversion.viaversion.api.minecraft.metadata.Metadata;
import com.viaversion.viaversion.api.type.Type; import com.viaversion.viaversion.api.type.Type;
import com.viaversion.viaversion.api.type.types.minecraft.AbstractMetaListType; import com.viaversion.viaversion.api.type.types.minecraft.AbstractMetaListType;
import io.netty.buffer.ByteBuf;
public class MetadataList1_8Type extends AbstractMetaListType { public class MetadataList1_8Type extends AbstractMetaListType {
@Override @Override

Datei anzeigen

@ -22,9 +22,9 @@
*/ */
package com.viaversion.viaversion.exception; package com.viaversion.viaversion.exception;
import com.viaversion.viaversion.api.Via;
import com.viaversion.viaversion.api.ViaManager; import com.viaversion.viaversion.api.ViaManager;
import io.netty.handler.codec.DecoderException; import io.netty.handler.codec.DecoderException;
import com.viaversion.viaversion.api.Via;
/** /**
* Thrown during packet decoding when an incoming packet should be cancelled. * Thrown during packet decoding when an incoming packet should be cancelled.

Datei anzeigen

@ -22,9 +22,9 @@
*/ */
package com.viaversion.viaversion.exception; package com.viaversion.viaversion.exception;
import com.viaversion.viaversion.api.Via;
import com.viaversion.viaversion.api.ViaManager; import com.viaversion.viaversion.api.ViaManager;
import io.netty.handler.codec.EncoderException; import io.netty.handler.codec.EncoderException;
import com.viaversion.viaversion.api.Via;
/** /**
* Thrown during packet encoding when an outgoing packet should be cancelled. * Thrown during packet encoding when an outgoing packet should be cancelled.

Datei anzeigen

@ -22,9 +22,9 @@
*/ */
package com.viaversion.viaversion.exception; package com.viaversion.viaversion.exception;
import com.viaversion.viaversion.api.Via;
import com.viaversion.viaversion.api.ViaManager; import com.viaversion.viaversion.api.ViaManager;
import io.netty.handler.codec.CodecException; import io.netty.handler.codec.CodecException;
import com.viaversion.viaversion.api.Via;
/** /**
* Thrown during packet transformation to cancel the packet. * Thrown during packet transformation to cancel the packet.

Datei anzeigen

@ -17,10 +17,10 @@
*/ */
package com.viaversion.viaversion.boss; package com.viaversion.viaversion.boss;
import org.bukkit.entity.Player;
import com.viaversion.viaversion.api.boss.BossBar; import com.viaversion.viaversion.api.boss.BossBar;
import com.viaversion.viaversion.api.boss.BossColor; import com.viaversion.viaversion.api.boss.BossColor;
import com.viaversion.viaversion.api.boss.BossStyle; import com.viaversion.viaversion.api.boss.BossStyle;
import org.bukkit.entity.Player;
public class ViaBossBar extends CommonBoss<Player> { public class ViaBossBar extends CommonBoss<Player> {

Datei anzeigen

@ -17,11 +17,11 @@
*/ */
package com.viaversion.viaversion.bukkit.classgenerator; package com.viaversion.viaversion.bukkit.classgenerator;
import io.netty.handler.codec.ByteToMessageDecoder;
import io.netty.handler.codec.MessageToByteEncoder;
import com.viaversion.viaversion.api.connection.UserConnection; import com.viaversion.viaversion.api.connection.UserConnection;
import com.viaversion.viaversion.bukkit.handlers.BukkitDecodeHandler; import com.viaversion.viaversion.bukkit.handlers.BukkitDecodeHandler;
import com.viaversion.viaversion.bukkit.handlers.BukkitEncodeHandler; import com.viaversion.viaversion.bukkit.handlers.BukkitEncodeHandler;
import io.netty.handler.codec.ByteToMessageDecoder;
import io.netty.handler.codec.MessageToByteEncoder;
public class BasicHandlerConstructor implements HandlerConstructor { public class BasicHandlerConstructor implements HandlerConstructor {
@Override @Override

Datei anzeigen

@ -17,7 +17,19 @@
*/ */
package com.viaversion.viaversion.bukkit.classgenerator; package com.viaversion.viaversion.bukkit.classgenerator;
import javassist.*; import com.viaversion.viaversion.ViaVersionPlugin;
import com.viaversion.viaversion.bukkit.handlers.BukkitDecodeHandler;
import com.viaversion.viaversion.bukkit.handlers.BukkitEncodeHandler;
import com.viaversion.viaversion.bukkit.util.NMSUtil;
import javassist.CannotCompileException;
import javassist.ClassPool;
import javassist.CtClass;
import javassist.CtField;
import javassist.CtMethod;
import javassist.CtNewConstructor;
import javassist.CtNewMethod;
import javassist.LoaderClassPath;
import javassist.NotFoundException;
import javassist.expr.ConstructorCall; import javassist.expr.ConstructorCall;
import javassist.expr.ExprEditor; import javassist.expr.ExprEditor;
import org.bukkit.Bukkit; import org.bukkit.Bukkit;
@ -27,10 +39,6 @@ import org.bukkit.event.EventPriority;
import org.bukkit.event.Listener; import org.bukkit.event.Listener;
import org.bukkit.plugin.EventExecutor; import org.bukkit.plugin.EventExecutor;
import org.bukkit.plugin.Plugin; import org.bukkit.plugin.Plugin;
import com.viaversion.viaversion.ViaVersionPlugin;
import com.viaversion.viaversion.bukkit.handlers.BukkitDecodeHandler;
import com.viaversion.viaversion.bukkit.handlers.BukkitEncodeHandler;
import com.viaversion.viaversion.bukkit.util.NMSUtil;
import java.lang.reflect.Method; import java.lang.reflect.Method;
@ -214,31 +222,31 @@ public class ClassGenerator {
// Bake constructor // Bake constructor
connectListenerClazz.addConstructor(CtNewConstructor.make( connectListenerClazz.addConstructor(CtNewConstructor.make(
"public ProtocolSupportConnectListener (ConnectionImpl connection) {\n" "public ProtocolSupportConnectListener (ConnectionImpl connection) {\n"
+ " this.connection = connection;\n" + " this.connection = connection;\n"
+ "}", connectListenerClazz)); + "}", connectListenerClazz));
// Add the listening method // Add the listening method
connectListenerClazz.addMethod(CtNewMethod.make( connectListenerClazz.addMethod(CtNewMethod.make(
// On packet receive // On packet receive
"public void onPacketReceiving(protocolsupport.api.Connection.PacketListener.PacketEvent event) {\n" "public void onPacketReceiving(protocolsupport.api.Connection.PacketListener.PacketEvent event) {\n"
// Check if we are getting handshake packet. // Check if we are getting handshake packet.
+ " if (event.getPacket() instanceof PacketHandshakingInSetProtocol) {\n" + " if (event.getPacket() instanceof PacketHandshakingInSetProtocol) {\n"
// Get protocol version. // Get protocol version.
+ " PacketHandshakingInSetProtocol packet = (PacketHandshakingInSetProtocol) event.getPacket();\n" + " PacketHandshakingInSetProtocol packet = (PacketHandshakingInSetProtocol) event.getPacket();\n"
+ (newVersionMethod ? ( + (newVersionMethod ? (
" int protoVersion = packet.getProtocolVersion();\n" " int protoVersion = packet.getProtocolVersion();\n"
) : ( ) : (
" int protoVersion = packet.b();\n" " int protoVersion = packet.b();\n"
)) ))
// ViaVersion has at this point already spoofed the connectionversion. (Since it is higher up the pipeline) // ViaVersion has at this point already spoofed the connectionversion. (Since it is higher up the pipeline)
// If via has put the protoVersion to the server we can spoof ProtocolSupport's version. // If via has put the protoVersion to the server we can spoof ProtocolSupport's version.
+ " if (connection.getVersion() == ProtocolVersion.MINECRAFT_FUTURE && protoVersion == com.viaversion.viaversion.api.Via.getAPI().getServerVersion().lowestSupportedVersion()) {\n" + " if (connection.getVersion() == ProtocolVersion.MINECRAFT_FUTURE && protoVersion == com.viaversion.viaversion.api.Via.getAPI().getServerVersion().lowestSupportedVersion()) {\n"
+ " connection.setVersion(ProtocolVersion.getLatest(ProtocolType.PC));\n" + " connection.setVersion(ProtocolVersion.getLatest(ProtocolType.PC));\n"
+ " }\n" + " }\n"
+ " }\n" + " }\n"
// Id version is not serverversion viaversion will not spoof. ProtocolSupport will handle the rest. // Id version is not serverversion viaversion will not spoof. ProtocolSupport will handle the rest.
// In any case, remove the packet listener and wrap up. // In any case, remove the packet listener and wrap up.
+ " connection.removePacketListener(this);\n" + " connection.removePacketListener(this);\n"
+ "}", connectListenerClazz)); + "}", connectListenerClazz));
return connectListenerClazz.toClass(HandlerConstructor.class.getClassLoader()); return connectListenerClazz.toClass(HandlerConstructor.class.getClassLoader());
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
@ -250,7 +258,8 @@ public class ClassGenerator {
if (getPSConnectListener() != null) { if (getPSConnectListener() != null) {
try { try {
Class<? extends Event> connectionOpenEvent = (Class<? extends Event>) Class.forName("protocolsupport.api.events.ConnectionOpenEvent"); Class<? extends Event> connectionOpenEvent = (Class<? extends Event>) Class.forName("protocolsupport.api.events.ConnectionOpenEvent");
Bukkit.getPluginManager().registerEvent(connectionOpenEvent, new Listener() { }, EventPriority.HIGH, new EventExecutor() { Bukkit.getPluginManager().registerEvent(connectionOpenEvent, new Listener() {
}, EventPriority.HIGH, new EventExecutor() {
@Override @Override
public void execute(Listener listener, Event event) throws EventException { public void execute(Listener listener, Event event) throws EventException {
try { try {

Datei anzeigen

@ -17,9 +17,9 @@
*/ */
package com.viaversion.viaversion.bukkit.classgenerator; package com.viaversion.viaversion.bukkit.classgenerator;
import com.viaversion.viaversion.api.connection.UserConnection;
import io.netty.handler.codec.ByteToMessageDecoder; import io.netty.handler.codec.ByteToMessageDecoder;
import io.netty.handler.codec.MessageToByteEncoder; import io.netty.handler.codec.MessageToByteEncoder;
import com.viaversion.viaversion.api.connection.UserConnection;
public interface HandlerConstructor { public interface HandlerConstructor {
public MessageToByteEncoder newEncodeHandler(UserConnection info, MessageToByteEncoder minecraftEncoder); public MessageToByteEncoder newEncodeHandler(UserConnection info, MessageToByteEncoder minecraftEncoder);

Datei anzeigen

@ -17,11 +17,11 @@
*/ */
package com.viaversion.viaversion.bukkit.commands; package com.viaversion.viaversion.bukkit.commands;
import com.viaversion.viaversion.commands.ViaCommandHandler;
import org.bukkit.command.Command; import org.bukkit.command.Command;
import org.bukkit.command.CommandExecutor; import org.bukkit.command.CommandExecutor;
import org.bukkit.command.CommandSender; import org.bukkit.command.CommandSender;
import org.bukkit.command.TabExecutor; import org.bukkit.command.TabExecutor;
import com.viaversion.viaversion.commands.ViaCommandHandler;
import java.util.List; import java.util.List;

Datei anzeigen

@ -17,9 +17,9 @@
*/ */
package com.viaversion.viaversion.bukkit.commands; package com.viaversion.viaversion.bukkit.commands;
import com.viaversion.viaversion.api.command.ViaCommandSender;
import org.bukkit.command.CommandSender; import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;
import com.viaversion.viaversion.api.command.ViaCommandSender;
import java.util.UUID; import java.util.UUID;

Datei anzeigen

@ -17,16 +17,16 @@
*/ */
package com.viaversion.viaversion.bukkit.handlers; package com.viaversion.viaversion.bukkit.handlers;
import com.viaversion.viaversion.protocol.ProtocolPipelineImpl; import com.viaversion.viaversion.api.connection.UserConnection;
import com.viaversion.viaversion.bukkit.classgenerator.ClassGenerator;
import com.viaversion.viaversion.bukkit.classgenerator.HandlerConstructor;
import com.viaversion.viaversion.connection.UserConnectionImpl; import com.viaversion.viaversion.connection.UserConnectionImpl;
import com.viaversion.viaversion.protocol.ProtocolPipelineImpl;
import io.netty.channel.Channel; import io.netty.channel.Channel;
import io.netty.channel.ChannelInitializer; import io.netty.channel.ChannelInitializer;
import io.netty.channel.socket.SocketChannel; import io.netty.channel.socket.SocketChannel;
import io.netty.handler.codec.ByteToMessageDecoder; import io.netty.handler.codec.ByteToMessageDecoder;
import io.netty.handler.codec.MessageToByteEncoder; import io.netty.handler.codec.MessageToByteEncoder;
import com.viaversion.viaversion.api.connection.UserConnection;
import com.viaversion.viaversion.bukkit.classgenerator.ClassGenerator;
import com.viaversion.viaversion.bukkit.classgenerator.HandlerConstructor;
import java.lang.reflect.Method; import java.lang.reflect.Method;

Datei anzeigen

@ -17,17 +17,17 @@
*/ */
package com.viaversion.viaversion.bukkit.handlers; package com.viaversion.viaversion.bukkit.handlers;
import io.netty.buffer.ByteBuf;
import io.netty.channel.ChannelHandlerContext;
import io.netty.handler.codec.ByteToMessageDecoder;
import com.viaversion.viaversion.api.Via; import com.viaversion.viaversion.api.Via;
import com.viaversion.viaversion.api.connection.UserConnection; import com.viaversion.viaversion.api.connection.UserConnection;
import com.viaversion.viaversion.api.protocol.packet.State;
import com.viaversion.viaversion.bukkit.util.NMSUtil; import com.viaversion.viaversion.bukkit.util.NMSUtil;
import com.viaversion.viaversion.exception.CancelCodecException; import com.viaversion.viaversion.exception.CancelCodecException;
import com.viaversion.viaversion.exception.CancelDecoderException; import com.viaversion.viaversion.exception.CancelDecoderException;
import com.viaversion.viaversion.exception.InformativeException; import com.viaversion.viaversion.exception.InformativeException;
import com.viaversion.viaversion.api.protocol.packet.State;
import com.viaversion.viaversion.util.PipelineUtil; import com.viaversion.viaversion.util.PipelineUtil;
import io.netty.buffer.ByteBuf;
import io.netty.channel.ChannelHandlerContext;
import io.netty.handler.codec.ByteToMessageDecoder;
import java.lang.reflect.InvocationTargetException; import java.lang.reflect.InvocationTargetException;
import java.util.List; import java.util.List;

Datei anzeigen

@ -17,19 +17,19 @@
*/ */
package com.viaversion.viaversion.bukkit.handlers; package com.viaversion.viaversion.bukkit.handlers;
import io.netty.buffer.ByteBuf;
import io.netty.channel.ChannelHandlerContext;
import io.netty.handler.codec.MessageToByteEncoder;
import com.viaversion.viaversion.api.Via; import com.viaversion.viaversion.api.Via;
import com.viaversion.viaversion.api.connection.UserConnection; import com.viaversion.viaversion.api.connection.UserConnection;
import com.viaversion.viaversion.api.protocol.packet.State;
import com.viaversion.viaversion.bukkit.util.NMSUtil; import com.viaversion.viaversion.bukkit.util.NMSUtil;
import com.viaversion.viaversion.exception.CancelCodecException; import com.viaversion.viaversion.exception.CancelCodecException;
import com.viaversion.viaversion.exception.CancelEncoderException; import com.viaversion.viaversion.exception.CancelEncoderException;
import com.viaversion.viaversion.exception.InformativeException; import com.viaversion.viaversion.exception.InformativeException;
import com.viaversion.viaversion.handlers.ChannelHandlerContextWrapper; import com.viaversion.viaversion.handlers.ChannelHandlerContextWrapper;
import com.viaversion.viaversion.handlers.ViaCodecHandler; import com.viaversion.viaversion.handlers.ViaCodecHandler;
import com.viaversion.viaversion.api.protocol.packet.State;
import com.viaversion.viaversion.util.PipelineUtil; import com.viaversion.viaversion.util.PipelineUtil;
import io.netty.buffer.ByteBuf;
import io.netty.channel.ChannelHandlerContext;
import io.netty.handler.codec.MessageToByteEncoder;
import java.lang.reflect.Field; import java.lang.reflect.Field;
import java.lang.reflect.InvocationTargetException; import java.lang.reflect.InvocationTargetException;

Datei anzeigen

@ -17,10 +17,10 @@
*/ */
package com.viaversion.viaversion.bukkit.handlers; package com.viaversion.viaversion.bukkit.handlers;
import com.viaversion.viaversion.api.connection.UserConnection;
import io.netty.buffer.ByteBuf; import io.netty.buffer.ByteBuf;
import io.netty.channel.ChannelHandlerContext; import io.netty.channel.ChannelHandlerContext;
import io.netty.handler.codec.MessageToMessageEncoder; import io.netty.handler.codec.MessageToMessageEncoder;
import com.viaversion.viaversion.api.connection.UserConnection;
import java.util.List; import java.util.List;

Datei anzeigen

@ -17,12 +17,12 @@
*/ */
package com.viaversion.viaversion.bukkit.listeners; package com.viaversion.viaversion.bukkit.listeners;
import com.viaversion.viaversion.api.Via;
import com.viaversion.viaversion.bukkit.platform.BukkitViaInjector;
import org.bukkit.event.EventHandler; import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener; import org.bukkit.event.Listener;
import org.bukkit.event.server.PluginDisableEvent; import org.bukkit.event.server.PluginDisableEvent;
import org.bukkit.event.server.PluginEnableEvent; import org.bukkit.event.server.PluginEnableEvent;
import com.viaversion.viaversion.api.Via;
import com.viaversion.viaversion.bukkit.platform.BukkitViaInjector;
public class ProtocolLibEnableListener implements Listener { public class ProtocolLibEnableListener implements Listener {

Datei anzeigen

@ -17,11 +17,11 @@
*/ */
package com.viaversion.viaversion.bukkit.listeners; package com.viaversion.viaversion.bukkit.listeners;
import com.viaversion.viaversion.api.Via;
import com.viaversion.viaversion.update.UpdateUtil;
import org.bukkit.event.EventHandler; import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener; import org.bukkit.event.Listener;
import org.bukkit.event.player.PlayerJoinEvent; import org.bukkit.event.player.PlayerJoinEvent;
import com.viaversion.viaversion.api.Via;
import com.viaversion.viaversion.update.UpdateUtil;
public class UpdateListener implements Listener { public class UpdateListener implements Listener {

Datei anzeigen

@ -17,18 +17,18 @@
*/ */
package com.viaversion.viaversion.bukkit.listeners.multiversion; package com.viaversion.viaversion.bukkit.listeners.multiversion;
import com.viaversion.viaversion.ViaVersionPlugin;
import com.viaversion.viaversion.api.Via;
import com.viaversion.viaversion.api.connection.ProtocolInfo;
import com.viaversion.viaversion.api.connection.UserConnection;
import com.viaversion.viaversion.api.protocol.version.ProtocolVersion;
import com.viaversion.viaversion.bukkit.listeners.ViaBukkitListener;
import org.bukkit.entity.EntityType; import org.bukkit.entity.EntityType;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler; import org.bukkit.event.EventHandler;
import org.bukkit.event.entity.EntityDamageEvent; import org.bukkit.event.entity.EntityDamageEvent;
import org.bukkit.event.player.PlayerQuitEvent; import org.bukkit.event.player.PlayerQuitEvent;
import org.bukkit.event.player.PlayerToggleSneakEvent; import org.bukkit.event.player.PlayerToggleSneakEvent;
import com.viaversion.viaversion.ViaVersionPlugin;
import com.viaversion.viaversion.api.Via;
import com.viaversion.viaversion.api.connection.UserConnection;
import com.viaversion.viaversion.api.protocol.version.ProtocolVersion;
import com.viaversion.viaversion.bukkit.listeners.ViaBukkitListener;
import com.viaversion.viaversion.api.connection.ProtocolInfo;
import java.lang.reflect.InvocationTargetException; import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method; import java.lang.reflect.Method;

Datei anzeigen

@ -17,19 +17,19 @@
*/ */
package com.viaversion.viaversion.bukkit.listeners.protocol1_15to1_14_4; package com.viaversion.viaversion.bukkit.listeners.protocol1_15to1_14_4;
import com.viaversion.viaversion.ViaVersionPlugin;
import com.viaversion.viaversion.api.minecraft.metadata.Metadata;
import com.viaversion.viaversion.api.minecraft.metadata.types.MetaType1_14;
import com.viaversion.viaversion.api.protocol.packet.PacketWrapper;
import com.viaversion.viaversion.api.type.Type;
import com.viaversion.viaversion.api.type.types.version.Types1_14;
import com.viaversion.viaversion.bukkit.listeners.ViaBukkitListener;
import com.viaversion.viaversion.protocols.protocol1_15to1_14_4.Protocol1_15To1_14_4;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler; import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority; import org.bukkit.event.EventPriority;
import org.bukkit.event.entity.EntityToggleGlideEvent; import org.bukkit.event.entity.EntityToggleGlideEvent;
import org.bukkit.potion.PotionEffectType; import org.bukkit.potion.PotionEffectType;
import com.viaversion.viaversion.ViaVersionPlugin;
import com.viaversion.viaversion.api.protocol.packet.PacketWrapper;
import com.viaversion.viaversion.api.minecraft.metadata.Metadata;
import com.viaversion.viaversion.api.minecraft.metadata.types.MetaType1_14;
import com.viaversion.viaversion.api.type.Type;
import com.viaversion.viaversion.api.type.types.version.Types1_14;
import com.viaversion.viaversion.bukkit.listeners.ViaBukkitListener;
import com.viaversion.viaversion.protocols.protocol1_15to1_14_4.Protocol1_15To1_14_4;
import java.util.Arrays; import java.util.Arrays;

Datei anzeigen

@ -17,18 +17,18 @@
*/ */
package com.viaversion.viaversion.bukkit.platform; package com.viaversion.viaversion.bukkit.platform;
import io.netty.buffer.ByteBuf; import com.viaversion.viaversion.ViaAPIBase;
import org.bukkit.Bukkit;
import org.bukkit.entity.Player;
import com.viaversion.viaversion.ViaVersionPlugin; import com.viaversion.viaversion.ViaVersionPlugin;
import com.viaversion.viaversion.api.Via; import com.viaversion.viaversion.api.Via;
import com.viaversion.viaversion.ViaAPIBase;
import com.viaversion.viaversion.api.boss.BossBar; import com.viaversion.viaversion.api.boss.BossBar;
import com.viaversion.viaversion.api.boss.BossColor; import com.viaversion.viaversion.api.boss.BossColor;
import com.viaversion.viaversion.api.boss.BossStyle; import com.viaversion.viaversion.api.boss.BossStyle;
import com.viaversion.viaversion.api.connection.UserConnection; import com.viaversion.viaversion.api.connection.UserConnection;
import com.viaversion.viaversion.boss.ViaBossBar; import com.viaversion.viaversion.boss.ViaBossBar;
import com.viaversion.viaversion.bukkit.util.ProtocolSupportUtil; import com.viaversion.viaversion.bukkit.util.ProtocolSupportUtil;
import io.netty.buffer.ByteBuf;
import org.bukkit.Bukkit;
import org.bukkit.entity.Player;
import java.util.UUID; import java.util.UUID;

Datei anzeigen

@ -17,9 +17,9 @@
*/ */
package com.viaversion.viaversion.bukkit.platform; package com.viaversion.viaversion.bukkit.platform;
import org.bukkit.plugin.Plugin;
import com.viaversion.viaversion.configuration.AbstractViaConfig;
import com.viaversion.viaversion.api.Via; import com.viaversion.viaversion.api.Via;
import com.viaversion.viaversion.configuration.AbstractViaConfig;
import org.bukkit.plugin.Plugin;
import java.io.File; import java.io.File;
import java.net.URL; import java.net.URL;

Datei anzeigen

@ -19,20 +19,20 @@ package com.viaversion.viaversion.bukkit.platform;
import com.google.gson.JsonArray; import com.google.gson.JsonArray;
import com.google.gson.JsonObject; import com.google.gson.JsonObject;
import io.netty.channel.ChannelFuture;
import io.netty.channel.ChannelHandler;
import io.netty.channel.ChannelInitializer;
import io.netty.channel.socket.SocketChannel;
import org.bukkit.Bukkit;
import org.bukkit.plugin.PluginDescriptionFile;
import com.viaversion.viaversion.util.Pair;
import com.viaversion.viaversion.api.Via; import com.viaversion.viaversion.api.Via;
import com.viaversion.viaversion.api.platform.ViaInjector; import com.viaversion.viaversion.api.platform.ViaInjector;
import com.viaversion.viaversion.bukkit.handlers.BukkitChannelInitializer; import com.viaversion.viaversion.bukkit.handlers.BukkitChannelInitializer;
import com.viaversion.viaversion.bukkit.util.NMSUtil; import com.viaversion.viaversion.bukkit.util.NMSUtil;
import com.viaversion.viaversion.util.ConcurrentList; import com.viaversion.viaversion.util.ConcurrentList;
import com.viaversion.viaversion.util.ListWrapper; import com.viaversion.viaversion.util.ListWrapper;
import com.viaversion.viaversion.util.Pair;
import com.viaversion.viaversion.util.ReflectionUtil; import com.viaversion.viaversion.util.ReflectionUtil;
import io.netty.channel.ChannelFuture;
import io.netty.channel.ChannelHandler;
import io.netty.channel.ChannelInitializer;
import io.netty.channel.socket.SocketChannel;
import org.bukkit.Bukkit;
import org.bukkit.plugin.PluginDescriptionFile;
import java.lang.reflect.Field; import java.lang.reflect.Field;
import java.lang.reflect.Method; import java.lang.reflect.Method;

Datei anzeigen

@ -17,11 +17,6 @@
*/ */
package com.viaversion.viaversion.bukkit.platform; package com.viaversion.viaversion.bukkit.platform;
import org.bukkit.Bukkit;
import org.bukkit.entity.Player;
import org.bukkit.event.HandlerList;
import org.bukkit.event.Listener;
import org.bukkit.scheduler.BukkitTask;
import com.viaversion.viaversion.ViaVersionPlugin; import com.viaversion.viaversion.ViaVersionPlugin;
import com.viaversion.viaversion.api.Via; import com.viaversion.viaversion.api.Via;
import com.viaversion.viaversion.api.connection.UserConnection; import com.viaversion.viaversion.api.connection.UserConnection;
@ -47,6 +42,11 @@ import com.viaversion.viaversion.protocols.protocol1_13to1_12_2.blockconnections
import com.viaversion.viaversion.protocols.protocol1_9to1_8.providers.BulkChunkTranslatorProvider; import com.viaversion.viaversion.protocols.protocol1_9to1_8.providers.BulkChunkTranslatorProvider;
import com.viaversion.viaversion.protocols.protocol1_9to1_8.providers.HandItemProvider; import com.viaversion.viaversion.protocols.protocol1_9to1_8.providers.HandItemProvider;
import com.viaversion.viaversion.protocols.protocol1_9to1_8.providers.MovementTransmitterProvider; import com.viaversion.viaversion.protocols.protocol1_9to1_8.providers.MovementTransmitterProvider;
import org.bukkit.Bukkit;
import org.bukkit.entity.Player;
import org.bukkit.event.HandlerList;
import org.bukkit.event.Listener;
import org.bukkit.scheduler.BukkitTask;
import java.util.HashSet; import java.util.HashSet;
import java.util.Locale; import java.util.Locale;

Datei anzeigen

@ -17,20 +17,20 @@
*/ */
package com.viaversion.viaversion.bukkit.providers; package com.viaversion.viaversion.bukkit.providers;
import com.viaversion.viaversion.api.Via;
import com.viaversion.viaversion.api.connection.ProtocolInfo;
import com.viaversion.viaversion.api.connection.UserConnection;
import com.viaversion.viaversion.api.protocol.version.ProtocolVersion;
import com.viaversion.viaversion.bukkit.tasks.protocol1_12to1_11_1.BukkitInventoryUpdateTask;
import com.viaversion.viaversion.bukkit.util.NMSUtil;
import com.viaversion.viaversion.protocols.protocol1_12to1_11_1.providers.InventoryQuickMoveProvider;
import com.viaversion.viaversion.protocols.protocol1_12to1_11_1.storage.ItemTransaction;
import com.viaversion.viaversion.util.ReflectionUtil;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;
import org.bukkit.event.inventory.InventoryType; import org.bukkit.event.inventory.InventoryType;
import org.bukkit.inventory.Inventory; import org.bukkit.inventory.Inventory;
import org.bukkit.inventory.InventoryView; import org.bukkit.inventory.InventoryView;
import org.bukkit.inventory.ItemStack; import org.bukkit.inventory.ItemStack;
import com.viaversion.viaversion.api.Via;
import com.viaversion.viaversion.api.connection.UserConnection;
import com.viaversion.viaversion.api.protocol.version.ProtocolVersion;
import com.viaversion.viaversion.bukkit.tasks.protocol1_12to1_11_1.BukkitInventoryUpdateTask;
import com.viaversion.viaversion.bukkit.util.NMSUtil;
import com.viaversion.viaversion.api.connection.ProtocolInfo;
import com.viaversion.viaversion.protocols.protocol1_12to1_11_1.providers.InventoryQuickMoveProvider;
import com.viaversion.viaversion.protocols.protocol1_12to1_11_1.storage.ItemTransaction;
import com.viaversion.viaversion.util.ReflectionUtil;
import java.lang.reflect.Field; import java.lang.reflect.Field;
import java.lang.reflect.InvocationTargetException; import java.lang.reflect.InvocationTargetException;

Datei anzeigen

@ -17,13 +17,13 @@
*/ */
package com.viaversion.viaversion.bukkit.providers; package com.viaversion.viaversion.bukkit.providers;
import org.bukkit.Bukkit;
import org.bukkit.entity.Player;
import com.viaversion.viaversion.api.Via; import com.viaversion.viaversion.api.Via;
import com.viaversion.viaversion.api.connection.UserConnection; import com.viaversion.viaversion.api.connection.UserConnection;
import com.viaversion.viaversion.bukkit.util.NMSUtil; import com.viaversion.viaversion.bukkit.util.NMSUtil;
import com.viaversion.viaversion.protocols.protocol1_9to1_8.providers.MovementTransmitterProvider; import com.viaversion.viaversion.protocols.protocol1_9to1_8.providers.MovementTransmitterProvider;
import com.viaversion.viaversion.protocols.protocol1_9to1_8.storage.MovementTracker; import com.viaversion.viaversion.protocols.protocol1_9to1_8.storage.MovementTracker;
import org.bukkit.Bukkit;
import org.bukkit.entity.Player;
import java.lang.reflect.Field; import java.lang.reflect.Field;
import java.lang.reflect.InvocationTargetException; import java.lang.reflect.InvocationTargetException;

Datei anzeigen

@ -17,10 +17,10 @@
*/ */
package com.viaversion.viaversion.bukkit.tasks.protocol1_12to1_11_1; package com.viaversion.viaversion.bukkit.tasks.protocol1_12to1_11_1;
import org.bukkit.Bukkit;
import org.bukkit.entity.Player;
import com.viaversion.viaversion.bukkit.providers.BukkitInventoryQuickMoveProvider; import com.viaversion.viaversion.bukkit.providers.BukkitInventoryQuickMoveProvider;
import com.viaversion.viaversion.protocols.protocol1_12to1_11_1.storage.ItemTransaction; import com.viaversion.viaversion.protocols.protocol1_12to1_11_1.storage.ItemTransaction;
import org.bukkit.Bukkit;
import org.bukkit.entity.Player;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Collections; import java.util.Collections;

Datei anzeigen

@ -17,9 +17,9 @@
*/ */
package com.viaversion.viaversion.bungee.commands; package com.viaversion.viaversion.bungee.commands;
import com.viaversion.viaversion.api.command.ViaCommandSender;
import net.md_5.bungee.api.CommandSender; import net.md_5.bungee.api.CommandSender;
import net.md_5.bungee.api.connection.ProxiedPlayer; import net.md_5.bungee.api.connection.ProxiedPlayer;
import com.viaversion.viaversion.api.command.ViaCommandSender;
import java.util.UUID; import java.util.UUID;

Datei anzeigen

@ -17,11 +17,11 @@
*/ */
package com.viaversion.viaversion.bungee.handlers; package com.viaversion.viaversion.bungee.handlers;
import com.viaversion.viaversion.protocol.ProtocolPipelineImpl; import com.viaversion.viaversion.api.connection.UserConnection;
import com.viaversion.viaversion.connection.UserConnectionImpl; import com.viaversion.viaversion.connection.UserConnectionImpl;
import com.viaversion.viaversion.protocol.ProtocolPipelineImpl;
import io.netty.channel.Channel; import io.netty.channel.Channel;
import io.netty.channel.ChannelInitializer; import io.netty.channel.ChannelInitializer;
import com.viaversion.viaversion.api.connection.UserConnection;
import java.lang.reflect.Method; import java.lang.reflect.Method;

Datei anzeigen

@ -17,13 +17,13 @@
*/ */
package com.viaversion.viaversion.bungee.handlers; package com.viaversion.viaversion.bungee.handlers;
import com.viaversion.viaversion.api.connection.UserConnection;
import com.viaversion.viaversion.exception.CancelCodecException;
import com.viaversion.viaversion.exception.CancelDecoderException;
import io.netty.buffer.ByteBuf; import io.netty.buffer.ByteBuf;
import io.netty.channel.ChannelHandler; import io.netty.channel.ChannelHandler;
import io.netty.channel.ChannelHandlerContext; import io.netty.channel.ChannelHandlerContext;
import io.netty.handler.codec.MessageToMessageDecoder; import io.netty.handler.codec.MessageToMessageDecoder;
import com.viaversion.viaversion.api.connection.UserConnection;
import com.viaversion.viaversion.exception.CancelCodecException;
import com.viaversion.viaversion.exception.CancelDecoderException;
import java.util.List; import java.util.List;

Datei anzeigen

@ -17,14 +17,14 @@
*/ */
package com.viaversion.viaversion.bungee.handlers; package com.viaversion.viaversion.bungee.handlers;
import io.netty.buffer.ByteBuf;
import io.netty.channel.ChannelHandler;
import io.netty.channel.ChannelHandlerContext;
import io.netty.handler.codec.MessageToMessageEncoder;
import com.viaversion.viaversion.api.connection.UserConnection; import com.viaversion.viaversion.api.connection.UserConnection;
import com.viaversion.viaversion.bungee.util.BungeePipelineUtil; import com.viaversion.viaversion.bungee.util.BungeePipelineUtil;
import com.viaversion.viaversion.exception.CancelCodecException; import com.viaversion.viaversion.exception.CancelCodecException;
import com.viaversion.viaversion.exception.CancelEncoderException; import com.viaversion.viaversion.exception.CancelEncoderException;
import io.netty.buffer.ByteBuf;
import io.netty.channel.ChannelHandler;
import io.netty.channel.ChannelHandlerContext;
import io.netty.handler.codec.MessageToMessageEncoder;
import java.util.List; import java.util.List;

Datei anzeigen

@ -17,19 +17,19 @@
*/ */
package com.viaversion.viaversion.bungee.listeners; package com.viaversion.viaversion.bungee.listeners;
import net.md_5.bungee.api.event.ServerConnectedEvent;
import net.md_5.bungee.api.plugin.Listener;
import net.md_5.bungee.event.EventHandler;
import net.md_5.bungee.event.EventPriority;
import com.viaversion.viaversion.api.protocol.packet.PacketWrapper;
import com.viaversion.viaversion.api.Via; import com.viaversion.viaversion.api.Via;
import com.viaversion.viaversion.api.connection.UserConnection; import com.viaversion.viaversion.api.connection.UserConnection;
import com.viaversion.viaversion.api.minecraft.metadata.Metadata; import com.viaversion.viaversion.api.minecraft.metadata.Metadata;
import com.viaversion.viaversion.api.minecraft.metadata.types.MetaType1_9; import com.viaversion.viaversion.api.minecraft.metadata.types.MetaType1_9;
import com.viaversion.viaversion.api.protocol.packet.PacketWrapper;
import com.viaversion.viaversion.api.type.Type; import com.viaversion.viaversion.api.type.Type;
import com.viaversion.viaversion.api.type.types.version.Types1_9; import com.viaversion.viaversion.api.type.types.version.Types1_9;
import com.viaversion.viaversion.protocols.protocol1_9to1_8.Protocol1_9To1_8; import com.viaversion.viaversion.protocols.protocol1_9to1_8.Protocol1_9To1_8;
import com.viaversion.viaversion.protocols.protocol1_9to1_8.storage.EntityTracker1_9; import com.viaversion.viaversion.protocols.protocol1_9to1_8.storage.EntityTracker1_9;
import net.md_5.bungee.api.event.ServerConnectedEvent;
import net.md_5.bungee.api.plugin.Listener;
import net.md_5.bungee.event.EventHandler;
import net.md_5.bungee.event.EventPriority;
import java.util.Collections; import java.util.Collections;

Datei anzeigen

@ -17,11 +17,11 @@
*/ */
package com.viaversion.viaversion.bungee.listeners; package com.viaversion.viaversion.bungee.listeners;
import com.viaversion.viaversion.api.Via;
import com.viaversion.viaversion.update.UpdateUtil;
import net.md_5.bungee.api.event.PostLoginEvent; import net.md_5.bungee.api.event.PostLoginEvent;
import net.md_5.bungee.api.plugin.Listener; import net.md_5.bungee.api.plugin.Listener;
import net.md_5.bungee.event.EventHandler; import net.md_5.bungee.event.EventHandler;
import com.viaversion.viaversion.api.Via;
import com.viaversion.viaversion.update.UpdateUtil;
public class UpdateListener implements Listener { public class UpdateListener implements Listener {

Datei anzeigen

@ -17,11 +17,11 @@
*/ */
package com.viaversion.viaversion.bungee.platform; package com.viaversion.viaversion.bungee.platform;
import net.md_5.bungee.api.connection.ProxiedPlayer;
import com.viaversion.viaversion.api.boss.BossBar; import com.viaversion.viaversion.api.boss.BossBar;
import com.viaversion.viaversion.api.boss.BossColor; import com.viaversion.viaversion.api.boss.BossColor;
import com.viaversion.viaversion.api.boss.BossStyle; import com.viaversion.viaversion.api.boss.BossStyle;
import com.viaversion.viaversion.boss.CommonBoss; import com.viaversion.viaversion.boss.CommonBoss;
import net.md_5.bungee.api.connection.ProxiedPlayer;
public class BungeeBossBar extends CommonBoss<ProxiedPlayer> { public class BungeeBossBar extends CommonBoss<ProxiedPlayer> {

Datei anzeigen

@ -17,14 +17,14 @@
*/ */
package com.viaversion.viaversion.bungee.platform; package com.viaversion.viaversion.bungee.platform;
import io.netty.buffer.ByteBuf;
import net.md_5.bungee.api.config.ServerInfo;
import net.md_5.bungee.api.connection.ProxiedPlayer;
import com.viaversion.viaversion.ViaAPIBase; import com.viaversion.viaversion.ViaAPIBase;
import com.viaversion.viaversion.api.boss.BossBar; import com.viaversion.viaversion.api.boss.BossBar;
import com.viaversion.viaversion.api.boss.BossColor; import com.viaversion.viaversion.api.boss.BossColor;
import com.viaversion.viaversion.api.boss.BossStyle; import com.viaversion.viaversion.api.boss.BossStyle;
import com.viaversion.viaversion.bungee.service.ProtocolDetectorService; import com.viaversion.viaversion.bungee.service.ProtocolDetectorService;
import io.netty.buffer.ByteBuf;
import net.md_5.bungee.api.config.ServerInfo;
import net.md_5.bungee.api.connection.ProxiedPlayer;
public class BungeeViaAPI extends ViaAPIBase<ProxiedPlayer> { public class BungeeViaAPI extends ViaAPIBase<ProxiedPlayer> {

Datei anzeigen

@ -17,9 +17,9 @@
*/ */
package com.viaversion.viaversion.bungee.platform; package com.viaversion.viaversion.bungee.platform;
import com.viaversion.viaversion.configuration.AbstractViaConfig;
import com.viaversion.viaversion.api.protocol.version.ProtocolVersion; import com.viaversion.viaversion.api.protocol.version.ProtocolVersion;
import com.viaversion.viaversion.bungee.providers.BungeeVersionProvider; import com.viaversion.viaversion.bungee.providers.BungeeVersionProvider;
import com.viaversion.viaversion.configuration.AbstractViaConfig;
import java.io.File; import java.io.File;
import java.net.URL; import java.net.URL;

Datei anzeigen

@ -18,16 +18,16 @@
package com.viaversion.viaversion.bungee.platform; package com.viaversion.viaversion.bungee.platform;
import com.google.gson.JsonObject; import com.google.gson.JsonObject;
import io.netty.channel.Channel;
import io.netty.channel.ChannelInitializer;
import it.unimi.dsi.fastutil.ints.IntLinkedOpenHashSet;
import it.unimi.dsi.fastutil.ints.IntSortedSet;
import com.viaversion.viaversion.api.Via; import com.viaversion.viaversion.api.Via;
import com.viaversion.viaversion.api.platform.ViaInjector; import com.viaversion.viaversion.api.platform.ViaInjector;
import com.viaversion.viaversion.bungee.handlers.BungeeChannelInitializer; import com.viaversion.viaversion.bungee.handlers.BungeeChannelInitializer;
import com.viaversion.viaversion.compatibility.ForcefulFieldModifier; import com.viaversion.viaversion.compatibility.ForcefulFieldModifier;
import com.viaversion.viaversion.compatibility.unsafe.UnsafeBackedForcefulFieldModifier; import com.viaversion.viaversion.compatibility.unsafe.UnsafeBackedForcefulFieldModifier;
import com.viaversion.viaversion.util.ReflectionUtil; import com.viaversion.viaversion.util.ReflectionUtil;
import io.netty.channel.Channel;
import io.netty.channel.ChannelInitializer;
import it.unimi.dsi.fastutil.ints.IntLinkedOpenHashSet;
import it.unimi.dsi.fastutil.ints.IntSortedSet;
import java.lang.reflect.Field; import java.lang.reflect.Field;
import java.util.List; import java.util.List;

Datei anzeigen

@ -17,13 +17,11 @@
*/ */
package com.viaversion.viaversion.bungee.platform; package com.viaversion.viaversion.bungee.platform;
import net.md_5.bungee.api.ProxyServer;
import net.md_5.bungee.api.plugin.Listener;
import net.md_5.bungee.api.scheduler.ScheduledTask;
import com.viaversion.viaversion.BungeePlugin; import com.viaversion.viaversion.BungeePlugin;
import com.viaversion.viaversion.api.Via; import com.viaversion.viaversion.api.Via;
import com.viaversion.viaversion.api.platform.ViaPlatformLoader; import com.viaversion.viaversion.api.platform.ViaPlatformLoader;
import com.viaversion.viaversion.api.protocol.version.ProtocolVersion; import com.viaversion.viaversion.api.protocol.version.ProtocolVersion;
import com.viaversion.viaversion.api.protocol.version.VersionProvider;
import com.viaversion.viaversion.bungee.handlers.BungeeServerHandler; import com.viaversion.viaversion.bungee.handlers.BungeeServerHandler;
import com.viaversion.viaversion.bungee.listeners.ElytraPatch; import com.viaversion.viaversion.bungee.listeners.ElytraPatch;
import com.viaversion.viaversion.bungee.listeners.UpdateListener; import com.viaversion.viaversion.bungee.listeners.UpdateListener;
@ -33,11 +31,13 @@ import com.viaversion.viaversion.bungee.providers.BungeeMainHandProvider;
import com.viaversion.viaversion.bungee.providers.BungeeMovementTransmitter; import com.viaversion.viaversion.bungee.providers.BungeeMovementTransmitter;
import com.viaversion.viaversion.bungee.providers.BungeeVersionProvider; import com.viaversion.viaversion.bungee.providers.BungeeVersionProvider;
import com.viaversion.viaversion.bungee.service.ProtocolDetectorService; import com.viaversion.viaversion.bungee.service.ProtocolDetectorService;
import com.viaversion.viaversion.api.protocol.version.VersionProvider;
import com.viaversion.viaversion.protocols.protocol1_9to1_8.providers.BossBarProvider; import com.viaversion.viaversion.protocols.protocol1_9to1_8.providers.BossBarProvider;
import com.viaversion.viaversion.protocols.protocol1_9to1_8.providers.EntityIdProvider; import com.viaversion.viaversion.protocols.protocol1_9to1_8.providers.EntityIdProvider;
import com.viaversion.viaversion.protocols.protocol1_9to1_8.providers.MainHandProvider; import com.viaversion.viaversion.protocols.protocol1_9to1_8.providers.MainHandProvider;
import com.viaversion.viaversion.protocols.protocol1_9to1_8.providers.MovementTransmitterProvider; import com.viaversion.viaversion.protocols.protocol1_9to1_8.providers.MovementTransmitterProvider;
import net.md_5.bungee.api.ProxyServer;
import net.md_5.bungee.api.plugin.Listener;
import net.md_5.bungee.api.scheduler.ScheduledTask;
import java.util.HashSet; import java.util.HashSet;
import java.util.Set; import java.util.Set;

Datei anzeigen

@ -17,10 +17,10 @@
*/ */
package com.viaversion.viaversion.bungee.providers; package com.viaversion.viaversion.bungee.providers;
import net.md_5.bungee.api.connection.ProxiedPlayer;
import com.viaversion.viaversion.api.connection.UserConnection; import com.viaversion.viaversion.api.connection.UserConnection;
import com.viaversion.viaversion.bungee.storage.BungeeStorage; import com.viaversion.viaversion.bungee.storage.BungeeStorage;
import com.viaversion.viaversion.protocols.protocol1_9to1_8.providers.EntityIdProvider; import com.viaversion.viaversion.protocols.protocol1_9to1_8.providers.EntityIdProvider;
import net.md_5.bungee.api.connection.ProxiedPlayer;
import java.lang.reflect.Method; import java.lang.reflect.Method;

Datei anzeigen

@ -17,11 +17,11 @@
*/ */
package com.viaversion.viaversion.bungee.providers; package com.viaversion.viaversion.bungee.providers;
import com.viaversion.viaversion.api.connection.ProtocolInfo;
import com.viaversion.viaversion.api.connection.UserConnection;
import com.viaversion.viaversion.protocols.protocol1_9to1_8.providers.MainHandProvider;
import net.md_5.bungee.api.ProxyServer; import net.md_5.bungee.api.ProxyServer;
import net.md_5.bungee.api.connection.ProxiedPlayer; import net.md_5.bungee.api.connection.ProxiedPlayer;
import com.viaversion.viaversion.api.connection.UserConnection;
import com.viaversion.viaversion.api.connection.ProtocolInfo;
import com.viaversion.viaversion.protocols.protocol1_9to1_8.providers.MainHandProvider;
import java.lang.reflect.InvocationTargetException; import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method; import java.lang.reflect.Method;

Datei anzeigen

@ -17,10 +17,10 @@
*/ */
package com.viaversion.viaversion.bungee.providers; package com.viaversion.viaversion.bungee.providers;
import com.viaversion.viaversion.api.protocol.packet.PacketWrapper;
import com.viaversion.viaversion.api.connection.UserConnection; import com.viaversion.viaversion.api.connection.UserConnection;
import com.viaversion.viaversion.api.type.Type; import com.viaversion.viaversion.api.protocol.packet.PacketWrapper;
import com.viaversion.viaversion.api.protocol.packet.State; import com.viaversion.viaversion.api.protocol.packet.State;
import com.viaversion.viaversion.api.type.Type;
import com.viaversion.viaversion.protocols.protocol1_9to1_8.Protocol1_9To1_8; import com.viaversion.viaversion.protocols.protocol1_9to1_8.Protocol1_9To1_8;
import com.viaversion.viaversion.protocols.protocol1_9to1_8.providers.MovementTransmitterProvider; import com.viaversion.viaversion.protocols.protocol1_9to1_8.providers.MovementTransmitterProvider;
import com.viaversion.viaversion.protocols.protocol1_9to1_8.storage.MovementTracker; import com.viaversion.viaversion.protocols.protocol1_9to1_8.storage.MovementTracker;

Datei anzeigen

@ -18,13 +18,13 @@
package com.viaversion.viaversion.bungee.providers; package com.viaversion.viaversion.bungee.providers;
import com.google.common.collect.Lists; import com.google.common.collect.Lists;
import net.md_5.bungee.api.ProxyServer;
import com.viaversion.viaversion.api.Via; import com.viaversion.viaversion.api.Via;
import com.viaversion.viaversion.api.connection.ProtocolInfo;
import com.viaversion.viaversion.api.connection.UserConnection; import com.viaversion.viaversion.api.connection.UserConnection;
import com.viaversion.viaversion.api.protocol.version.ProtocolVersion; import com.viaversion.viaversion.api.protocol.version.ProtocolVersion;
import com.viaversion.viaversion.protocols.base.BaseVersionProvider; import com.viaversion.viaversion.protocols.base.BaseVersionProvider;
import com.viaversion.viaversion.api.connection.ProtocolInfo;
import com.viaversion.viaversion.util.ReflectionUtil; import com.viaversion.viaversion.util.ReflectionUtil;
import net.md_5.bungee.api.ProxyServer;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Collections; import java.util.Collections;

Einige Dateien werden nicht angezeigt, da zu viele Dateien in diesem Diff geändert wurden Mehr anzeigen