ProtocolLib 4.7.0

Provides read/write access to the Minecraft protocol

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

    Use the latest dev build for 1.18
    Use the latest release for all other recent Minecraft versions


    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:
    • Use the issue tracker! Don't report bugs in the reviews. Please search for duplicates before reporting a new issue!
    • 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.7.0</version>
      </dependency>
      <!-- And so on -->
    </dependencies>
    Gradle:
    Code (Java):
    dependencies {
       compileOnly group: "com.comphenix.protocol", name: "ProtocolLib", version: "4.7.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.

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

    https://github.com/sponsors/dmulloy2


    Huge thanks to my sponsors:
    • hawkfalcon
    • PaulBGD
    • Yive
    • TheCrealm
    • Aternos
    • GiansCode
    • JustBru00
    • Photon
    • Intriguing-RC
    • Andarius68
    • Koenn11

    Donations
    You can also make a one-time donation via PayPal (or sponsors, see above)

    [​IMG]

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

    • nathan818 - $1000
    • MineCove - $100
    • Lael - $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 and searching for duplicates), where I can actually diagnose and fix your issue.

Recent Updates

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

Recent Reviews

  1. GMs1D2Yy
    GMs1D2Yy
    5/5,
    Version: 4.7.0
    Best plugin no why! Mostly All minecraft plugin require this to run!
    Then, Happy 1Million downloads!
  2. Achy
    Achy
    5/5,
    Version: 4.7.0
    as always awesome plugin for any servers, not sure why but some people commented in my profile "retarded" "braindead" cause they asume i downrated an awesome plugin, which i havent so i've came to rate this, 5/5 can't run bukkit/spigot/paper without this, unless if its vanilla
  3. stumper66
    stumper66
    5/5,
    Version: 4.7.0
    This is a must have plugin for many plugin developers. Takes all the nms boilerplate work out for you.
  4. BeefDev
    BeefDev
    5/5,
    Version: 4.7.0
    As a plugin developer myself, I find using any sort of packets really annoying since making them work on many versions is a pain, thanks for taking that away.
  5. HugoTor09
    HugoTor09
    5/5,
    Version: 4.7.0
    Its literally the best plugin on spigot, ALL the plugins use it, its increible! Allow to create faster and better plugins.
  6. kill05
    kill05
    5/5,
    Version: 4.7.0
    Just getting into spigot development, and ProtocolLib is a godsend, a must have for every developer who needs to deal with packets
  7. Kuba1001PL
    Kuba1001PL
    5/5,
    Version: 4.7.0
    A very good plugin! ProtocoLlib allows to create others plugins faster and easier. Do not stop to develop it!
  8. xiongliu
    xiongliu
    5/5,
    Version: 4.7.0
    Awesome plugin! Never had any issues with it whatsoever. Amazing Developer. keep at it!
  9. ProIEZRush
    ProIEZRush
    5/5,
    Version: 4.7.0
    The best way to save time coding with reflection.
    I just recommend to create a good wiki.
    ;D
  10. Dydrogen
    Dydrogen
    5/5,
    Version: 4.7.0
    Excellent! It works perfectly.
    = = I have nothing else to say. -------------------------