Home›Java›Mods›[LIB] ● SocketLib ● Handle your data
[LIB] ● SocketLib ● Handle your data
ModsJava

[LIB] ● SocketLib ● Handle your data

Minecraft Java mod. Downloads from the MC Java Mods app on Android.

⬇ Download on Spigot
SocketLib is an easy lib for developers to handle their data between the following type of servers:

Bukkit «-» Bukkit
Bungeecord «-» Bungeecord
Bungeecord «-» Bukkit

There is also a support for non-minecraft java-applications!

You only have to import the methods in your plugins. The only thing you have to do is the HandleData. You have your data you want to handle, so i wrote a TODO line for it.

-----------------------------------------------------------------------------------------------------------------------​
Here you have an example, how you can handle the data:

The message which is sent:
Code (Text):
ConnectionHandler.sendDataToSocket("SendMessage:SirCreepix:Hey whats going on!");
And how to handle the data:
Code (Text):
    public void handleData(String data){
        if(data.startsWith("SendMessage:")){
            String player = data.split(":")[1];
            String message = "";
            for(int i = 2; i < data.split(":").length; i++){
                message = message + data.split(":")[i] + " ";
            }
            if(Bukkit.getPlayer(player) != null){
                Player p = Bukkit.getPlayer(player);
                p.sendMessage(message);
            }
        }
    }
Quick facts

Install steps are the general flow for this file type — How to install Minecraft Java mods & modpacks walks through it step by step.

[LIB] ● SocketLib ● Handle your data is a free Minecraft Java mod. Downloaded 255 times (via Spigot). Download it and open it directly in the game.

Explore more