Login

Sign Up

We will not share your personal details with any third party.

Minecraft @ MMMOs - Your source for Minecraft News
Welcome
Minecraft Bukkit Server Plugins > plugin details: PacketAPI

PacketAPI

Quick Overview for PacketAPI: PacketAPI PacketAPI is currently only available for CraftBukkit 1.7.5. Sometimes working with packets can be harder than people think, working with NMS, keeping you code up-to-date, and many more problems may raise up. This plugin has many features, here a list of them: Fast and Lightweight Easy to use No reflection required to acces NMS classes Your code always up-to-date (updates will be made to the api, not to your code) Custom listener handlers Constru..

Plugin Details

PacketAPI

header

PacketAPI is currently only available for CraftBukkit 1.7.5.

Sometimes working with packets can be harder than people think, working with NMS, keeping you code up-to-date, and many more problems may raise up. This plugin has many features, here a list of them:

  • Fast and Lightweight
  • Easy to use
  • No reflection required to acces NMS classes
  • Your code always up-to-date (updates will be made to the api, not to your code)
  • Custom listener handlers
  • Constructors for every packet (exactly specified what needed)

Why using this plugin instead of other packet api's?

PacketAPI was basically made to be as lightweight and easy to use as possible, here a little diagram I made (time in nanoseconds):

diagram

Permissions

None.

Commands

None.

Source Code

The source code can be found on my git:
git

I am a developer!

Here a basic example of how sending an animation packet can be done:

picture

Here an example of how packet interception can be done, this little plugin will cancel the PacketPlayOutAnimation packet:

testplugin

More examples and an explanation can be found on the developer page:
Page not created yet.

Why is this easy to use?

The first, finding out what data an argument needs (in the default NMS constructor) can be really hard, for example the PacketPlayOutBed packet, this is how it's being handled in NMS:

nms constructor

  • The first problem which will raise up is that this constructor wants an entityhuman, which requires you to cast you player to CraftHumanEntity, this causes you plugin to become onuseable every update.
  • The second problem with the default constructor is that most people don't know what data the argument needs, for example, the constructor above, what are these 3 integers? What are they for?
What is PacketAPI different from this?

Well, alot, all PacketAPI constructors all require bukkit classes, for example a Player instead of an EntityPlayer (which means you never have to update your plugin). Also, I renamed all the constructor arguments, so everyone knows what it is, for example the PacketPlayOutBed packet mentioned earlier, but now in PacketAPI:

packetapi constructor

As you can see, it's very clear what this constructor needs, a player, and the x, y, z location.

Statistics

This plugin uses Metrics, the Metrics page can be found here:

metrics

This plugin utilises Hidendra's plugin metrics system, which means that the following information is collected and sent to mcstats.org:

  • A unique identifier
  • The server's version of Java
  • Whether the server is in offline or online mode
  • The plugin's version
  • The server's version
  • The OS version/name and architecture
  • The core count for the CPU
  • The number of players online
  • The Metrics version

Opting out of this service can be done by editing plugins/Plugin Metrics/config.yml and changing opt-out to true.

I found a bug!

If you think you found a bug, please report it to by sending a private message, thanks.

New Features

I haven't really planned to add new features, but if you have any idea please send me a private message.

Categories: developer-tools,
Created Date: Mar 25, 2014
Updated Date: 2014-05-06 21:10:10
Plugin Name: PacketAPI
Author: BigTeddy98

latest plugins

Picture Login
MyServerDirector
WorldEdit Selection Visualizer
MoreCrates
RegexBans
IClear
PacketAPI
MoseCraftCore

Share This

Just Added

x
Page generated in 0.0348 seconds. Users Online: 168
network

sites

featured