Giter Site home page Giter Site logo

simple-packet-listener's Introduction

Simple Packet Listener

Another Spigot plugin to allow plugins to listening to packets.

This spigot plugin is designed to add new Bukkit events (about packet receiving and sending) and catch these events like other Bukkit events.

But, how do it work ?

Like the most packet interception plugins, it will inject into players connections an new channel handler which it will fire new Bukkit events.

Currently, this plugin only support for packet in-game and packet status listening (not handshaking or login).

It's seem to be good but how can I use it ?

It's quite simple ! You just need to specified in your plugin.yml your plugin depend on Simple-Packet-Listener and in your code, you handle PacketReceiveEvent and/or PacketSendEvent like that :

@EventHandler
public void onPacketReceive(PacketReceiveEvent event)
{
     System.out.println("I receive " + event.getPacket().getClass().getSimpleName() + " !");
}

@EventHandler
public void onPacketSend(PacketSendEvent event)
{
     System.out.println("I send " + event.getPacket().getClass().getSimpleName() + " !");
}

And what can I do with these 2 events ?

You can :

  • Handle packet in their raw format (you can use NMS or reflection).
  • Access to packet's fields via Reflection (an utility class has been created to help you to access to classes and fields named as NmsReflection).
  • Implementing custom events depends on packets sending or receiving.

Which version of server are supported ?

This plugin has been designed to run on Spigot 1.17 but it works from 1.13. (1.17 and 1.16.5 have been used to test this plugin).

What is the structure of this plugin ?

This project is split into 2 parts :

  • api contains all shared classes to all plugins.
  • src contains core plugin code.

simple-packet-listener's People

Contributors

drogonientity avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.