diff --git a/src/main/java/us/myles/ViaVersion/api/PacketWrapper.java b/src/main/java/us/myles/ViaVersion/api/PacketWrapper.java index fb98b284b..dc3315d44 100644 --- a/src/main/java/us/myles/ViaVersion/api/PacketWrapper.java +++ b/src/main/java/us/myles/ViaVersion/api/PacketWrapper.java @@ -3,7 +3,6 @@ package us.myles.ViaVersion.api; import com.google.common.base.Preconditions; import io.netty.buffer.ByteBuf; import io.netty.buffer.Unpooled; -import lombok.Data; import lombok.Getter; import lombok.Setter; import us.myles.ViaVersion.api.data.UserConnection; diff --git a/src/main/java/us/myles/ViaVersion/api/command/ViaSubCommand.java b/src/main/java/us/myles/ViaVersion/api/command/ViaSubCommand.java index d3a658c6d..000b97d6e 100644 --- a/src/main/java/us/myles/ViaVersion/api/command/ViaSubCommand.java +++ b/src/main/java/us/myles/ViaVersion/api/command/ViaSubCommand.java @@ -59,7 +59,7 @@ public abstract class ViaSubCommand { public List onTabComplete(CommandSender sender, String[] args) { return Collections.emptyList(); } - + public String color(String s) { return ViaCommandHandler.color(s); } diff --git a/src/main/java/us/myles/ViaVersion/classgenerator/HandlerConstructor.java b/src/main/java/us/myles/ViaVersion/classgenerator/HandlerConstructor.java index fe534238a..19a5423c4 100644 --- a/src/main/java/us/myles/ViaVersion/classgenerator/HandlerConstructor.java +++ b/src/main/java/us/myles/ViaVersion/classgenerator/HandlerConstructor.java @@ -6,5 +6,6 @@ import us.myles.ViaVersion.api.data.UserConnection; public interface HandlerConstructor { public MessageToByteEncoder newEncodeHandler(UserConnection info, MessageToByteEncoder minecraftEncoder); + public ByteToMessageDecoder newDecodeHandler(UserConnection info, ByteToMessageDecoder minecraftDecoder); } diff --git a/src/main/java/us/myles/ViaVersion/commands/defaultsubs/PPSSubCmd.java b/src/main/java/us/myles/ViaVersion/commands/defaultsubs/PPSSubCmd.java index c3aa86551..d2e7bc186 100644 --- a/src/main/java/us/myles/ViaVersion/commands/defaultsubs/PPSSubCmd.java +++ b/src/main/java/us/myles/ViaVersion/commands/defaultsubs/PPSSubCmd.java @@ -56,6 +56,9 @@ public class PPSSubCmd extends ViaSubCommand { sendMessage(sender, "&cAverage: &f" + (totalPackets / clients)); sendMessage(sender, "&cHighest: &f" + max); } + if (clients == 0) { + sendMessage(sender, "&cNo clients to display."); + } for (Map.Entry> entry : sorted.entrySet()) sendMessage(sender, "&8[&6%s&8]: &b%s", ProtocolVersion.getProtocol(entry.getKey()).getName(), entry.getValue()); sorted.clear(); diff --git a/src/main/java/us/myles/ViaVersion/handlers/ViaDecodeHandler.java b/src/main/java/us/myles/ViaVersion/handlers/ViaDecodeHandler.java index 0177dbd43..c7122233e 100644 --- a/src/main/java/us/myles/ViaVersion/handlers/ViaDecodeHandler.java +++ b/src/main/java/us/myles/ViaVersion/handlers/ViaDecodeHandler.java @@ -38,7 +38,7 @@ public class ViaDecodeHandler extends ByteToMessageDecoder { // Increment received boolean second = info.incrementReceived(); // Check PPS - if(second) { + if (second) { if (((ViaVersionPlugin) ViaVersion.getInstance()).handlePPS(info)) return; } diff --git a/src/main/java/us/myles/ViaVersion/protocols/protocol1_10to1_9_3/Protocol1_10To1_9_3_4.java b/src/main/java/us/myles/ViaVersion/protocols/protocol1_10to1_9_3/Protocol1_10To1_9_3_4.java index 3e5f64d2e..3363c6847 100644 --- a/src/main/java/us/myles/ViaVersion/protocols/protocol1_10to1_9_3/Protocol1_10To1_9_3_4.java +++ b/src/main/java/us/myles/ViaVersion/protocols/protocol1_10to1_9_3/Protocol1_10To1_9_3_4.java @@ -10,8 +10,8 @@ import us.myles.ViaVersion.api.remapper.ValueTransformer; import us.myles.ViaVersion.api.type.Type; import us.myles.ViaVersion.packets.State; import us.myles.ViaVersion.protocols.protocol1_10to1_9_3.storage.ResourcePackTracker; -import us.myles.ViaVersion.protocols.protocol1_10to1_9_3.types.MetaList1_10Type; import us.myles.ViaVersion.protocols.protocol1_10to1_9_3.types.Meta1_10Type; +import us.myles.ViaVersion.protocols.protocol1_10to1_9_3.types.MetaList1_10Type; import java.util.List; diff --git a/src/main/java/us/myles/ViaVersion/protocols/protocol1_9_1_2to1_9_3_4/BlockEntity.java b/src/main/java/us/myles/ViaVersion/protocols/protocol1_9_1_2to1_9_3_4/BlockEntity.java index 988364720..2394b82a8 100644 --- a/src/main/java/us/myles/ViaVersion/protocols/protocol1_9_1_2to1_9_3_4/BlockEntity.java +++ b/src/main/java/us/myles/ViaVersion/protocols/protocol1_9_1_2to1_9_3_4/BlockEntity.java @@ -63,7 +63,7 @@ public class BlockEntity { updateSign(pos, lines, connection); } } catch (Exception e) { - if(ViaVersion.getInstance().isDebug()) { + if (ViaVersion.getInstance().isDebug()) { System.out.println("Block Entity: " + e.getMessage() + ": " + tag); } } diff --git a/src/main/java/us/myles/ViaVersion/protocols/protocol1_9to1_8/packets/SpawnPackets.java b/src/main/java/us/myles/ViaVersion/protocols/protocol1_9to1_8/packets/SpawnPackets.java index c3f6eb3eb..789514c0a 100644 --- a/src/main/java/us/myles/ViaVersion/protocols/protocol1_9to1_8/packets/SpawnPackets.java +++ b/src/main/java/us/myles/ViaVersion/protocols/protocol1_9to1_8/packets/SpawnPackets.java @@ -12,8 +12,6 @@ import us.myles.ViaVersion.api.remapper.ValueCreator; import us.myles.ViaVersion.api.remapper.ValueTransformer; import us.myles.ViaVersion.api.type.Type; import us.myles.ViaVersion.packets.State; -import us.myles.ViaVersion.protocols.base.ProtocolInfo; -import us.myles.ViaVersion.protocols.protocol1_10to1_9_3.Protocol1_10To1_9_3_4; import us.myles.ViaVersion.protocols.protocol1_9to1_8.ItemRewriter; import us.myles.ViaVersion.protocols.protocol1_9to1_8.Protocol1_9TO1_8; import us.myles.ViaVersion.protocols.protocol1_9to1_8.metadata.MetadataRewriter;