Sueta
SO

SocketConnector

2017-09-27

Libary for easy Socket based Communication

·Plugin

About

This Plugin connects to the SocketConnectorBungee Server and transports Packets to a(the) target Server.
It was designed to fix some Problems i had with BungeeCordPlugin Messages, like having a Player on the target Server to send a message to the Server.

This is the Server https://www.spigotmc.org/resources/socketconnectorbungee.47676/

How to install

  1. Download the SocketConnector jar and put it into your Servers Plugin folder
  2. I highly recommend that you create the config first and set it up
  3. Set the Ip and the Port u choosed in SocketConnectorBungee as Server
  4. Set a name for your Server, multiple Servers with the same name are not working
  5. Restart the Server

Api How to use

If u want to recieve Packets from another Server/Bungee listen to the "ClientMessageEvent".

@EventHandler(priority = EventPriority.HIGHEST)
    public void onClientMessageEvent(ClientMessageEvent e){
        System.out.println("recieved from" + e.getSender() + ":" + e.getMessage());
    }

If u want to send Messages to another Server/Bungee use this code

SocketConnector.getInstance().cm.sendMessage("Hello world", "all");

Or

SocketConnector.getInstance().cm.sendMessage("Hello world", "server1");

Similar projects

Plugin →