Multisockets : No more Plugin Messaging Channels! 6.2.1

for Spigot & BungeeCord

  1. Hazae41
    Tested Minecraft Versions:
    • 1.7
    • 1.8
    • 1.9
    • 1.10
    • 1.11
    • 1.12
    • 1.13
    Source Code:
    https://github.com/hazae41/mc-multisockets
    [​IMG]


    [​IMG]

    [​IMG]
    ________________________________________________________________________________________________________________

    Tired of Plugin Messaging Channels?

    This plugin simply allows developers to send any data from a server to another using sockets with AES encryption

    You can send data from any instance of BungeeCord or Spigot to any instance of BungeeCord or Spigot, just with few lines and without headache ;)

    WebSockets allows you to have whole conversations instead of simple request-response

    You can even send and receive data from web apps using JavaScript

    Admins


    Just put the file in the plugins folder of your BungeeCord and of your Spigots

    Example of network
    Let's suppose you have one BungeeCord and two Spigots: Factions and HungerGames.

    Each server will have one socket, each on a different port.
    • BungeeCord has a socket on port 25590
    • Factions has a socket on port 25591
    • HungerGames has a socket on port 25592

    BungeeCord
    Code (YAML):
    sockets:
      "bungee"
    :
        port
    : 25590
        connections
    :
          "factions"
    :
            host
    : localhost
            port
    : 25591
          "hungergames"
    :
            host
    : localhost
            port
    : 25592
    Factions
    Code (YAML):
    sockets:
      "factions"
    :
        port
    : 25591
        connections
    :
          "bungee"
    :
            host
    : localhost
            port
    : 25590
          "hungergames"
    :
            host
    : localhost
            port
    : 25592
    HungerGames
    Code (YAML):
    sockets:
      "hungergames"
    :
        port
    : 25592
        connections
    :
          "factions"
    :
            host
    : localhost
            port
    : 25591
          "bungee"
    :
            host
    : localhost
            port
    : 25590

    Developers
    It only supports Kotlin for the moment

    Go to JitPack

    Kotlin
    Code (Java):
    // When your plugin is enabled
    override fun onEnable(){

        // When any socket is started
        onSocketEnable { name ->
            println("Enabled socket $name on port $port")
           
            // You must define all routes here
       
            // Create route to /MyPlugin/test
            onConversation("/MyPlugin/test"){
                // Send unencrypted message
                send("it works!")
                // Wait until a message is received
                println(readMessage())
                // Do it as many times as you want
                send("it still works!")
                println(readMessage())
            }
           
            hello("factions")
        }
    }

    fun Socket.hello(target: String){
        // Get the connection to target
        val connection = connections[target]
        ?: return println("Unknown connection: $target")
       
        // Start a conversation to /MyPlugin/hello
        connection.conversation("/MyPlugin/hello") {
            // Use AES encryption
            val (encrypt, decrypt) = aes()
            // Send encrypted message
            send("hello world!".encrypt())
            // Wait until a message is received and decrypt it
            println(readMessage().decrypt())
        }
       
        connection.printFactions()
    }

    fun Connection.printFactions(){
        // Short function equivalent to conversation { readMessage() }
        request("/Factions/factions"){
            // Just print the first message received and close the conversation
            result -> println(result)
        }
    }
    The #mc-multisockets on GitHub
    Getreidemonster, IdkMan, Fxve and 6 others like this.

Recent Updates

  1. 6.2.1
  2. 6.2
  3. 6.1.3

Recent Reviews

  1. DrOreo002
    DrOreo002
    5/5,
    Version: 4.0.4
    This will helps me a lot on developing bungee plugin!. Thanks for this!

    100 Chars
    1. Hazae41
      Author's Response
      You're welcome! Please consider donating if you want to support this plugin :)
  2. Pas02
    Pas02
    5/5,
    Version: 4.0.3
    I like the idea of the plugin and it's easier to understand than PluginMessaging!
    1. Hazae41
      Author's Response
      Thanks! Please consider donating if you want to support this plugin :)
  3. Cisnet
    Cisnet
    5/5,
    Version: 3.2.8
    thanks .
    1. Hazae41
      Author's Response
      You're welcome! Please consider donating if you want to support this plugin :)
  4. Getreidemonster
    Getreidemonster
    5/5,
    Version: Release 3.2.5
    Unfortunately the example-code doesn't works - I'm using Java 8, my plugins (bungeecord- and spigot-side) has no errors.
    The BungeeCord Code doesn't sends any message to my console.

    Any ideas?
    1. Hazae41
      Author's Response
      Send me your code
  5. Getreidemonster
    Getreidemonster
    5/5,
    Version: Release 3.2.4
    Hi, nice releases in the last time - I just got a quick question (i was a long time not using socket4mc xD) how do i get "getSocket()" method? isn't there already in the api itself?

    Spoonfeed me please with the getSocket method xD (seriously)
    1. Hazae41
      Author's Response
      Use Socket4Bukkit#getClient()
      or Socket4Sponge#getClient()
  6. Dawid
    Dawid
    3/5,
    Version: Release 2.1.7
    Good plugin but I have a errors in console and if sockets not be connected CPU usage is very big!
    1. Hazae41
  7. keke142
    keke142
    1/5,
    Version: Beta 2.1.3
    Terrible CPU usage and the author not answering to my private message.
    Otherwise the plugin itself is not bad, pity ....
  8. Getreidemonster
    Getreidemonster
    5/5,
    Version: Beta 2.1.3
    Awesome! I don't like Plugin Messaging Channels... sockets are much easier to understanding :D

    Thanks @Hazae41! :))
    1. Hazae41
  9. JustSanchyro
    JustSanchyro
    4/5,
    Version: Beta 2.1.3
    Hey dude, I like the idea but im trying to figure this out.
    I want it to set in my scoreboard the amount of players in a specific server.
    Please help me
    1. Hazae41
      Author's Response
      You can do it by sending data in JSON
  10. Boss_Aimbot
    Boss_Aimbot
    2/5,
    Version: Beta 2.1.2
    1. Hazae41
      Author's Response
      Please check your ports. And please MP me instead of sending negative review.