tr-SocketApi 1.0.1

Create connection beetween your lobby and you minigames Server

  1. Amosar
    Tested Minecraft Versions:
    • 1.10
    • 1.11
    • 1.12
    Source Code:
    https://gitlab.com/Trafalcraft/tr-SocketApi
    Languages Supported:
    Français, and all others with custom config file
    tr-SocketApi is a plugin to connect your lobby with your minigamesPlugin.
    It's an api, it need to be include in your plugin.

    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

    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"
     
    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 :)

    Plugin that use this plugin:
    tr-OITC (code)
    tr-DAC (code)
    tr-FFA (code)
    tr-CTF (code)

    If you like my plugin :)
    [​IMG]

Recent Reviews

  1. 330ludo
    330ludo
    5/5,
    Version: 1.0.1
    it's very good plugin!! very easy to configure and use. he is very convenient for the mini-games with dedicated server