ProtocolLib 4.3.0

Provides read/write access to the Minecraft protocol

  1. dmulloy2
    Tested Minecraft Versions:
    • 1.8
    • 1.9
    • 1.10
    • 1.11
    • 1.12
    Source Code:
    https://github.com/dmulloy2/ProtocolLib/
    Contributors:
    dmulloy2 and aadnk
    ProtocolLib

    If you're running 1.8, 1.9, 1.10, 1.11, or 1.12, use the latest release.
    If you're running 1.7 or below, use the 3.7.0 release.

    Note: As of 4.3.0, Java 8 is required. If you must use Java 7, you can find older versions in the version history tab.


    Thanks for over 200k downloads y'all!

    If you love ProtocolLib or it has made your life significantly easier, consider donating 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.
    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 comprehensive tutorial can be found here.

    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>http://repo.dmulloy2.net/nexus/repository/public/</url>
      </repository>
      <!-- And so on -->
    </repositories>
    Then add it as a dependency like so:
    HTML:
    <dependencies>
      <dependency>
        <groupId>com.comphenix.protocol</groupId>
        <artifactId>ProtocolLib-API</artifactId>
        <version>4.3.0</version>
      </dependency>
      <!-- And so on -->
    </dependencies>
    Developers are encouraged to use the ProtocolLib-API module as a dependency as of version 4.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 CraftBukkit. 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.

    Statistics
    ProtocolLib collects statistics anonymously through MCStats. 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. Don't donate if you can't afford it.

    [​IMG]

    Huge thanks to those who have donated! :)
    (If I missed you, shoot me a PM)

    • nathan818 - $1000
    • joehot200 - $75
    • Techcable - $30
    • VintageDon - $25
    • games647 - $25
    • snapsi - $5
    Please don't leave bug reports in the reviews section. It's the single worst place to get support. Use the issue tracker, where I can actually diagnose and fix your issue.
    BrandPV, MCC321, Yuhiy and 45 others like this.

Recent Updates

  1. ProtocolLib v4.3.0
  2. ProtocolLib v4.2.1
  3. ProtocolLib v4.2.0

Recent Reviews

  1. Eduard0331
    Eduard0331
    5/5,
    Version: 4.3.0
    Awesome plugin!
    This plugin I love and I've always used it but lately it gives me a huge mistake and I do not know what to do

    (Google Translate)

    https://pastebin.com/ejKcJeyx
  2. Asura_Prism
    Asura_Prism
    5/5,
    Version: 4.3.0
    Good plugin! support very large developer creator! :DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD
  3. Arrowheads844
    Arrowheads844
    5/5,
    Version: 4.3.0
    this is a great plugin it has saved my server a lot of trouble just waiting for 1.12.1 to come out though
  4. kongkongye
    kongkongye
    5/5,
    Version: 4.3.0
    This library plugin is so awsome for developer! There's no reason not to use it if you need to build some plugins to hack into protocol.
  5. R00t
    R00t
    5/5,
    Version: 4.3.0
    Thx for making plugins muuuuuch easier to develop! You are a great developer! :D
  6. Tree_Trunks1234
    Tree_Trunks1234
    5/5,
    Version: 4.3.0
    Great plugin, my developers often rely on this plugin to make their own. Keep up the great work! 10/10
  7. YanisDark
    YanisDark
    1/5,
    Version: 4.3.0
    My server refuses to launch due to your plugin. It was working perfectly fine yesterday but it decided to not work anymore for no reason
    1. dmulloy2
      Author's Response
      Thank you for the helpful feedback!
  8. xBallisticBlazex
    xBallisticBlazex
    4/5,
    Version: 4.3.0
    Awesome plugin. Made development on several plugins much easier without too much NMS. Would be awesome if you added safety checks for things like viaversion and such. Keep up the good work!
    1. dmulloy2
      Author's Response
      Safety checks?
  9. joehot200
    joehot200
    5/5,
    Version: 4.3.0
    Work on many plugins, including my plugin AntiAura, would most definitely become significantly harder without the time spent on this plugin being developed for free for us all to use.

    Thank you for the hard work that is put into this plugin.
    1. dmulloy2
      Author's Response
      Thanks for your continued support!
  10. Nish
    Nish
    5/5,
    Version: 4.3.0
    thanks for this plugin! makes a lot of thing easy for developers
    but i have a question. can this plugin cause more ping for players?