Home›Java›Mods›tr-SocketApi
tr-SocketApi
ModsJava

tr-SocketApi

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

⬇ Download on Spigot
tr-SocketApi is a plugin to connect your lobby with your minigamesPlugin.
It's an api, he need an add in your plugin code .

Feature:
-Allow to check if player can join a minigames in another server
-Custom Message

Command:
Server:
- /join <server> <mini-game> <arena> (player) (complement) - to send a join request
Client:
-nothing for no

Permission:
Server :
- socketServeurApi.sendRequest -> Allow to send a join request
- socketServeurApi.sendRequestForOtherPlayer -> Allow to send a join request for other player
Client :
-nothing for no

Spoiler: Example of config.yml
Spoiler: Server
Code (Text):

#port to listen the connection Request
port: 2016
Msg
  default:
    prefix: "§9[§3Mini-Games§9]> §2"
    error: "§9[§4Mini-Games§9]> §c"
    no_permission: "§4Error §9§l> §r§bYou dont have permission to do that!"
    command_use: "§9[§4Mini-Games§9]> §r§cCommand use: §6$command"
  joueur:
    requestDeny: "§cMinigame is not available for this moment please try later\n§cOr contact an Admin on the forum > trafalcraft.com"
    requestSend: "Connection request sent please wait"
    requestSendForOtherPlayer: "Connection request for $player sent please wait!"
    requestSendByOtherPlayer: "Connection request by $player sent please wait!"
    playerdontExist: "The player must exist"
 
Spoiler: Client
Code (Text):

#ip to send a connection Request
ipLobby: "127.0.0.1"
#ip to send a connection Request
port: 2016
#Unique serverName to the command join
serverName: "OITC"
 

Usage in your plugin:
javadoc

Create this class
Code (Text):

import com.trafalcraft.client.api.SocketPlugin;

public class SocketPerso implements SocketPlugin {

    @Override
    public boolean checkJoin(String arg0, String arg1) {
                //Your check method
    }

    @Override
    public void playerJoin(String arg0, String arg1, String arg2) {
        //Your join method
    }

}
 
Register the Class
Code (Text):

public void onEnable(){
            SocketApi.registerPlugin(miniGamesName, new SocketPerso());
}
 
[​IMG]

Futur update:
-Add more fonctionnality (player currently in game, joinSpec...)
-Your suggests :)

Serveur that use this plugin:
http://www.trafalcraft.com > for minigames


Source:
[​IMG]
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.

tr-SocketApi is a free Minecraft Java mod. Compatible with Minecraft 1.10. Downloaded 544 times (via Spigot). Download it and open it directly in the game.

Explore more