[API] PluginMessageAPI+ - Object Orientated Plugin Message Wrapper

Discussion in 'WIP and Development Status' started by iKeirNez, Dec 31, 2013.

Thread Status:
Not open for further replies.
  1. So I was working on a private project which required a lot of communication between our Proxy, Lobby and Slave servers. The lobby and slaves ran on Bukkit whilst the Proxy ran on BungeeCord. We had choice of either using sockets or the plugin message api. I opted for the plugin message api.

    After using it for awhile it became easy to see that it was easy to make mistakes and the code was very long to do this. So instead I created my own wrapper for the plugin message api. It works very similarly to the way vanilla Minecraft handles packets, via objects. The api is also works across Bukkit and BungeeCord and supports BungeeCord's forward channel (forwards a packet/message to another server)

    I've been using it a lot in this project and I am almost ready to release it. The only issue is I have absolutely no idea what to name it. I would like it to be descriptive about what it does. If you guys have any suggestions then let me know. Someone suggest PluginMessageAPI+ which I really like so I'm going with that. I'll link to it here when I release it.

    I hope to in the future add support for client mods (via Forge etc)

    EDIT: Some example usage:

    1. packetManager.sendPacket(new PacketPlayer(player), new PacketUpdatePoints(50)); // this packet would be sent via the players connection to the BungeeCord server which would then read, process the packet and add 50 points onto the players balance

    To receive:

    1. @PacketHandler
    2. public void onPacketPoints(PacketUpdatePoints packet){
    3. someClass.updatePoints(packet.getSender().getBungeePlayer(), packet.points);
    4. }


    EDIT: Repo is up, writing a proper post for this just now https://github.com/iKeirNez/PluginMessageAPI-Plus

    EDIT2: I've made a proper post here, please reply there instead http://forums.bukkit.org/threads/api-pluginmessageapi.213649/
  2. Offline


    Awesome!! This will come in handy for a project i'm working on, and I dont want to poll my database each second :p

  3. Yep, we had it setup so only the lobby server has access to the database. The bad thing about this is servers can't communicate to each other unless there is a player connected to each server you need to communicate with.

    Repo is up now btw, check the original post

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
    Last edited by a moderator: Jun 6, 2016
  4. Offline


    Okay, cool! Thanks :D
  5. Offline


    I hope this doesn't get locked for mentioning BungeeCord...
    Anyways, nice work :)
  6. Not so far anyway, hopefully the mods are understanding
Thread Status:
Not open for further replies.

Share This Page