Class PacketTranslator.TranslatorBuilder

  • Enclosing class:
    PacketTranslator

    public static final class PacketTranslator.TranslatorBuilder
    extends java.lang.Object
    • Field Detail

      • NO_OP_TRANSLATOR

        public static final java.util.function.BiConsumer<Packet,​java.util.List<Packet>> NO_OP_TRANSLATOR
      • DROPPING_TRANSLATOR

        public static final java.util.function.BiConsumer<Packet,​java.util.List<Packet>> DROPPING_TRANSLATOR
    • Constructor Detail

      • TranslatorBuilder

        public TranslatorBuilder()
    • Method Detail

      • dropPacketC2S

        public void dropPacketC2S​(int... ids)
      • dropPacketS2C

        public void dropPacketS2C​(int... ids)
      • translatePacketC2S

        public void translatePacketC2S​(java.util.function.BiConsumer<Packet,​java.util.List<Packet>> translator,
                                       int... ids)
      • translatePacketC2S

        public <T extends Packet> void translatePacketC2S​(java.lang.Class<T> inClass,
                                                          java.util.function.Function<T,​Packet> constructor,
                                                          int id)
      • translatePacketS2C

        public void translatePacketS2C​(java.util.function.BiConsumer<Packet,​java.util.List<Packet>> translator,
                                       int... ids)
      • translatePacketS2C

        public <T extends Packet> void translatePacketS2C​(java.lang.Class<T> inClass,
                                                          java.util.function.Function<T,​Packet> constructor,
                                                          int id)
      • registerPacketClass

        public void registerPacketClass​(java.lang.Class<? extends Packet> clazz,
                                        int id)
      • itemsNotPresent

        public void itemsNotPresent​(int... ids)
      • getC2S

        public java.util.function.BiConsumer<Packet,​java.util.List<Packet>>[] getC2S()
      • getS2C

        public java.util.function.BiConsumer<Packet,​java.util.List<Packet>>[] getS2C()
      • setActualProtocolVersion

        public void setActualProtocolVersion​(int actualProtocolVersion)