ProtocolLib 4.6.0

Provides read/write access to the Minecraft protocol

  1. dmulloy2
    Native Minecraft Version:
    1.16
    Tested Minecraft Versions:
    • 1.8
    • 1.9
    • 1.10
    • 1.11
    • 1.12
    • 1.13
    • 1.14
    • 1.15
    • 1.16
    Source Code:
    https://github.com/dmulloy2/ProtocolLib/
    Contributors:
    dmulloy2 and aadnk
    ProtocolLib

    If you're running Java 16 or Paper dev builds, use the latest dev build.
    If you're running 1.8 through 1.16, use the latest release.
    If you're running 1.7 or below, use the 3.7.0 release.


    Thanks for over 1 million downloads everyone!

    If you love ProtocolLib or it has made your life significantly easier, consider a one-time donation, sponsoring the project or leaving a positive review below. It really means a lot!

    Certain tasks are impossible to perform with the standard Bukkit API and may require working with and even modifying Minecraft directly. A common technique is to modify incoming and outgoing packets or to inject custom packets into the stream. This is quite cumbersome to do, however, and most implementations will break as soon as a new version of Minecraft has been released, mostly due to obfuscation.

    ProtocolLib is a library that allows read and write access to the Minecraft protocol. It handles most of the overhead required with reflection and channel injection and provides wrappers to simplify packet modification. It is updated with most Minecraft updates so, ideally, individual plugins don't have to. ProtocolLib often doesn't need to be updated for minor updates, especially if there are few code changes (i.e. the 1.8 security updates)

    Useful Links
    Support
    Before reporting a bug:
    • Look for an update for ProtocolLib, there's a good chance your error or bug has already been fixed.
    • Read the stack trace and make sure it's an error with ProtocolLib. ProtocolLib's package is com.comphenix.protocol. If you don't see that anywhere, it's not ProtocolLib.
    • Check the common errors wiki page.
    When reporting a bug:
    • I'd prefer it if you used the issue tracker, but you can also do this in the discussion section. Don't report bugs in the reviews.
    • Provide as much information as possible. Provide your ProtocolLib version and Spigot version.
    • Provide any stack traces or "errors" using pastebin.
    For server operators
    Just download ProtocolLib from the link above. It doesn't do anything on its own, it simply allows other plugins to function.

    For developers
    A somewhat dated tutorial can be found here. A new tutorial is in progress on the wiki.

    TinyProtocol
    There is a lightweight alternative to ProtocolLib called TinyProtocol. It is essentially a mechanism to send and receive raw packets without structure modifiers or wrappers. It can be found here.

    Maven repository
    If you're using Maven, you'll be able to automatically download the jar, JavaDoc and associated sources from the following repository:
    HTML:
    <repositories>
      <repository>
        <id>dmulloy2-repo</id>
        <url>https://repo.dmulloy2.net/repository/public/</url>
      </repository>
      <!-- And so on -->
    </repositories>
    Gradle:
    Code (Java):
    repositories {
        maven { url "https://repo.dmulloy2.net/repository/public/" }
    }

    Then add it as a dependency like so:
    HTML:
    <dependencies>
      <dependency>
        <groupId>com.comphenix.protocol</groupId>
        <artifactId>ProtocolLib</artifactId>
        <version>4.6.0</version>
      </dependency>
      <!-- And so on -->
    </dependencies>
    Gradle:
    Code (Java):
    dependencies {
       compileOnly group: "com.comphenix.protocol", name: "ProtocolLib", version: "4.6.0";
    }
    Commands
    Protocol
    Main administrative command. Supports the following sub-commands:
    • config: Reload the configuration file.
    • check: Check for new versions on BukkitDev.
    • version: Displays the currently running version of ProtocolLib.
    • timings: Toggle measuring the amount of CPU time spent by each plugin.
    • listeners: Display what plugins are using ProtocolLib, and the packet types they are intercepting.
    PacketLog
    Logs hex representations of the provided packets to a file or to console
    Syntax: /packetlog <protocol> <sender> <packet> [file/console]
    Accepted packets can be found here.

    All of these commands require the permission protocol.admin.

    Configuration
    A small set of configuration options are available:
    Global section
    Code (YAML):
    auto updater.notify: true #Inform any player with the permission protocol.info when a new version of ProtocolLib is out.
    auto updater.download
    : false #Automatically download and install the newest version of ProtocolLib. The installation will take effect when the server restarts.
    auto updater.delay
    : 43200 #The number of seconds between each check for a new update.
    auto updater.last
    : 0 #This simply records the last time (in seconds since 01.01.1970) an update check was performed. Set it to 0 to force a new update check.
    metrics
    : true #If TRUE, ProtocolLib will publish anonymous usage data to mcstats.org. Set it to FALSE to opt-out.
    background compiler
    : true #If TRUE, ProtocolLib will try and improve performance by replacing reflection with compiled code on-the-fly.
    ignore version check
    : None #Force ProtocolLib to start for a specified Minecraft version, even if it is incompatible.
    Compatibility
    One of the main goals of this project was to achieve maximum compatibility with different versions of Minecraft. And the end result is quite flexible. Aside from package changes, it should be resilient against future changes. It's likely that I won't have to update ProtocolLib for anything but bug fixes and new features.

    How is this possible? It all comes down to reflection in the end. Essentially, no name is hard coded - every field, method and class is deduced by looking at field types, package names or parameter types. It's remarkably consistent across different versions.

    Example Plugins
    Some well-made plugins that do interesting things with ProtocolLib. Check out their source (if available) for some inspiration.
    DM me if you also use ProtocolLib and want to be on the list

    Statistics
    ProtocolLib collects statistics anonymously through BStats. Participation is completely optional and you can opt-out at any time, although it is really helpful in figuring out what environments the plugin is running in (i.e. versions of Spigot, Java, and ProtocolLib), so I can adjust development accordingly.

    Donations
    If ProtocolLib has made your life significantly easier or you're feeling particularly generous, consider donating! It's a great way to support the many hours I've spent maintaining this plugin and keeps me motivated. Please don't donate if you can't afford it.

    [​IMG]

    Huge thanks to my sponsors and those who have donated! :)
    (If I missed you or you want to remain anonymous, shoot me a PM)

    • nathan818 - $1000
    • MineCove - $100
    • joehot200 - $75
    • Techcable - $30
    • VintageDon - $25
    • games647 - $25
    • Photon - $15
    • Ltd-Net - $11
    • CultivateMC - $10
    • Axzial - $10
    • snapsi - $5
    • Aberzhulan - $5
    • Art in the Shade - $5
    Please don't leave bug reports in the reviews section. It's the worst place to get support and I won't respond. Use the issue tracker (after checking the common errors page), where I can actually diagnose and fix your issue.
    Frost-ZX, omerbadawy, Alic and 81 others like this.

Recent Updates

  1. ProtocolLib v4.6.0
  2. ProtocolLib v4.5.1
  3. ProtocolLib v4.5.0

Recent Reviews

  1. javajake123
    javajake123
    5/5,
    Version: 4.6.0
    Hey, when I try to join one of the servers on my network from the hub, this happens. it's the only one that is 1.8, I use a securing system (bungee cord) it says it needs protocollib installed to work on 1.8 but I still get this error when joining; 04.04 17:29:41 [Server] INFO [07:29:41 INFO]: Replace Blocks: [1, 5] 04.04 17:29:41 [Server] INFO [07:29:41 INFO]: Nerfing mobs spawned from spawners: false 04.04 17:29:41 [Server] INFO [07:29:41 INFO]: Cactus Growth Modifier: 100% 04.04 17:29:41 [Server] INFO [07:29:41 INFO]: Cane Growth Modifier: 100% 04.04 17:29:41 [Server] INFO [07:29:41 INFO]: Melon Growth Modifier: 100% 04.04 17:29:41 [Server] INFO [07:29:41 INFO]: Mushroom Growth Modifier: 100% 04.04 17:29:41 [Server] INFO [07:29:41 INFO]: Pumpkin Growth Modifier: 100% 04.04 17:29:41 [Server] INFO [07:29:41 INFO]: Sapling Growth Modifier: 100% 04.04 17:29:41 [Server] INFO [07:29:41 INFO]: Wheat Growth Modifier: 100% 04.04 17:29:41 [Server] INFO [07:29:41 INFO]: NetherWart Growth Modifier: 100% 04.04 17:29:41 [Server] INFO [07:29:41 INFO]: Entity Activation Range: An 32 / Mo 32 / Mi 16 04.04 17:29:41 [Server] INFO [07:29:41 INFO]: Entity Tracking Range: Pl 48 / An 48 / Mo 48 / Mi 32 / Other 64 04.04 17:29:41 [Server] INFO [07:29:41 INFO]: Hopper Transfer: 8 Hopper Check: 8 Hopper Amount: 1 04.04 17:29:41 [Server] INFO [07:29:41 INFO]: Random Lighting Updates: false 04.04 17:29:41 [Server] INFO [07:29:41 INFO]: Structure Info Saving: true 04.04 17:29:41 [Server] INFO [07:29:41 INFO]: Sending up to 10 chunks per packet 04.04 17:29:41 [Server] INFO [07:29:41 INFO]: Max Entity Collisions: 4 04.04 17:29:41 [Server] INFO [07:29:41 INFO]: Custom Map Seeds: Village: 10387312 Feature: 14357617 04.04 17:29:41 [Server] INFO [07:29:41 INFO]: Max TNT Explosions: 100 04.04 17:29:41 [Server] INFO [07:29:41 INFO]: Tile Max Tick Time: 50ms Entity max Tick Time: 50ms 04.04 17:29:42 [Multicraft] Skipped 120 lines due to rate limit (30/s) 04.04 17:29:42 [Server] INFO [07:29:42 INFO]: Preparing spawn area: 99% 04.04 17:29:42 [Server] INFO [07:29:42 INFO]: Preparing start region for level 1 (Seed: 2490884370782286738) 04.04 17:29:43 [Server] INFO [07:29:43 INFO]: Preparing start region for level 2 (Seed: 2490884370782286738) 04.04 17:29:43 [Server] INFO [07:29:43 INFO]: [BungeeGuard] Enabling BungeeGuard v1.2-SNAPSHOT 04.04 17:29:43 [Server] INFO [07:29:43 INFO]: [BungeeGuard] Using ProtocolLib to listen for connections. 04.04 17:29:43 [Server] INFO [07:29:43 INFO]: Server permissions file permissions.yml is empty, ignoring it 04.04 17:29:43 [Server] Startup [07:29:43 INFO]: Done (2.057s)! For help, type "help" or "?" 04.04 17:29:43 [Server] INFO [07:29:43 INFO]: Timings Reset 04.04 17:30:17 [Server] INFO [07:30:17 INFO]: Error Unable to inject incoming channel [id: 0x0a28f4c2, L:/51.161.132.10:25595 - R:/139.99.149.231:56191]. (java.lang.IllegalArgumentException: Unable to find NetworkManager in [id: 0x0a28f4c2, L:/51.161.132.10:25595 - R:/139.99.149.231:56191]) occured in [email protected] 04.04 17:30:17 [Server] INFO [07:30:17 ERROR]: [ProtocolLib] INTERNAL ERROR: Unable to inject incoming channel [id: 0x0a28f4c2, L:/51.161.132.10:25595 - R:/139.99.149.231:56191]. 04.04 17:30:17 [Server] INFO If this problem hasn't already been reported, please open a ticket 04.04 17:30:17 [Server] INFO at https://github.com/dmulloy2/ProtocolLib/issues with the following data: 04.04 17:30:17 [Server] INFO Stack Trace: 04.04 17:30:17 [Server] INFO java.lang.IllegalArgumentException: Unable to find NetworkManager in [id: 0x0a28f4c2, L:/51.161.132.10:25595 - R:/139.99.149.231:56191] 04.04 17:30:17 [Server] INFO at com.comphenix.protocol.injector.netty.InjectionFactory.findNetworkManager(InjectionFactory.java:209) 04.04 17:30:17 [Server] INFO at com.comphenix.protocol.injector.netty.InjectionFactory.fromChannel(InjectionFactory.java:142) 04.04 17:30:17 [Server] INFO at com.comphenix.protocol.injector.netty.ProtocolInjector$1.initChannel(ProtocolInjector.java:155) 04.04 17:30:17 [Server] INFO at io.netty.channel.ChannelInitializer.initChannel(ChannelInitializer.java:129) 04.04 17:30:17 [Server] INFO at io.netty.channel.ChannelInitializer.handlerAdded(ChannelInitializer.java:112) 04.04 17:30:17 [Server] INFO at io.netty.channel.AbstractChannelHandlerContext.callHandlerAdded(AbstractChannelHandlerContext.java:938) 04.04 17:30:17 [Server] INFO at io.netty.channel.DefaultChannelPipeline.callHandlerAdded0(DefaultChannelPipeline.java:609) 04.04 17:30:17 [Server] INFO at io.netty.channel.DefaultChannelPipeline.addLast(DefaultChannelPipeline.java:223) 04.04 17:30:17 [Server] INFO at io.netty.channel.DefaultChannelPipeline.addLast(DefaultChannelPipeline.java:381) 04.04 17:30:17 [Server] INFO at io.netty.channel.DefaultChannelPipeline.addLast(DefaultChannelPipeline.java:370) 04.04 17:30:17 [Server] INFO at com.comphenix.protocol.injector.netty.ProtocolInjector$2.initChannel(ProtocolInjector.java:169) 04.04 17:30:17 [Server] INFO at io.netty.channel.ChannelInitializer.initChannel(ChannelInitializer.java:129) 04.04 17:30:17 [Server] INFO at io.netty.channel.ChannelInitializer.handlerAdded(ChannelInitializer.java:112) 04.04 17:30:17 [Server] INFO at io.netty.channel.AbstractChannelHandlerContext.callHandlerAdded(AbstractChannelHandlerContext.java:938) 04.04 17:30:17 [Server] INFO at io.netty.channel.DefaultChannelPipeline.callHandlerAdded0(DefaultChannelPipeline.java:609) 04.04 17:30:17 [Server] INFO at io.netty.channel.DefaultChannelPipeline.access$100(DefaultChannelPipeline.java:46) 04.04 17:30:17 [Server] INFO at io.netty.channel.DefaultChannelPipeline$PendingHandlerAddedTask.execute(DefaultChannelPipeline.java:1463) 04.04 17:30:17 [Server] INFO at io.netty.channel.DefaultChannelPipeline.callHandlerAddedForAllHandlers(DefaultChannelPipeline.java:1115) 04.04 17:30:17 [Server] INFO at io.netty.channel.DefaultChannelPipeline.invokeHandlerAddedIfNeeded(DefaultChannelPipeline.java:650) 04.04 17:30:17 [Server] INFO at io.netty.channel.AbstractChannel$AbstractUnsafe.register0(AbstractChannel.java:502) 04.04 17:30:17 [Server] INFO at io.netty.channel.AbstractChannel$AbstractUnsafe.access$200(AbstractChannel.java:417) 04.04 17:30:17 [Server] INFO at io.netty.channel.AbstractChannel$AbstractUnsafe$1.run(AbstractChannel.java:474) 04.04 17:30:17 [Server] INFO at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:164) 04.04 17:30:17 [Server] INFO at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:472) Thanks!
  2. Dartanman
    Dartanman
    5/5,
    Version: 4.6.0
    ProtocolLib makes the lives of developers much easier. Thank you. Fantastic. So good.
  3. 6598175
    6598175
    5/5,
    Version: 4.6.0
    Nice Plugin!! I like it!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
  4. Carl0Jonshon
    Carl0Jonshon
    5/5,
    Version: 4.6.0
    Damn it, I put these 5 stars and now bring me compatibility with Mohist 1.16.5 XD
  5. stumper66
    stumper66
    5/5,
    Version: 4.6.0
    This plugin is a god-send for plugin developers. It makes many things possible that otherwise would not.
  6. nibchi
    nibchi
    5/5,
    Version: 4.6.0
    Thank you for these updates and a fantastic plugin!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! :D
  7. joehot200
    joehot200
    5/5,
    Version: 4.6.0
    Beautiful update as always, cheers for always doing a great job on ProtocolLib <3
    1. dmulloy2
  8. _TheProff_
    _TheProff_
    5/5,
    Version: 4.6.0
    Thanks so much for fully releasing the plugin for 1.16 :)
    Very convenient timing - I was about to release something that needs it.
  9. tuanbinn2004
    tuanbinn2004
    5/5,
    Version: 4.6.0
    oh. remove dev build
    ;/
    ..................................................................
    1. dmulloy2
      Author's Response
      that dev build got released ;)
  10. Nestdot
    Nestdot
    5/5,
    Version: 4.5.1
    Great plugin, I didn't have any trouble downloading it, setting it up is really easy and fast.