Send Rcon Command?

Discussion in 'Plugin Development' started by Meatiex, Jul 10, 2014.

Thread Status:
Not open for further replies.
  1. Offline

    Meatiex

    I host 3 server, I want to have the ranks all the same, sql isn't a option, in-game my admins type /rank player name, I want to send rcon commands to my other 2 servers when my admins set peoples ranks.

    How to I send rcon commands?
    can i send rcon commands to localhost? (127.0.0.1)
    do i need to open ports to do this?

    Any help is very much appreciated, i wanna get my ranks global :p
     
  2. Offline

    Dealyise

  3. Offline

    Necrodoom

    Dealyise Unofficial builds and offline mode servers are not supported here.
     
    Dealyise likes this.
  4. Offline

    Dealyise


    Edited it, thanks for the warning.
     
  5. Offline

    fireblast709

    Meatiex you need to enable rcon in the server.properties, and need to set a password. Optionally you can also set a port, otherwise it will default to server port + 10. A bit more info on the protocol.
     
  6. Offline

    Meatiex

    Rcon works on all the servers, I can connect with my phone and send commands(different ports for each server)
    I want to send command like i do with my phone with a plugin.
    google.com/store/apps/details?id=me.jenibor.minecraftserverstatus
    anyone know how? Help would be great :D

    I found a way to do it with java script, 'll try to convert it...
    https://github.com/tehbeard/node-rcon/blob/master/examples/minecraft.js
    From the link above i was able to gather the code below, but it still has tons of errors in it... any help?
    Code:java
    1. Rcon rcon = new Rcon();
    2. rcon.connect("localhost", 25575, "password", connected);
    3. public void connected(String err, String response) {
    4. rcon.sendCommand("op superman", function(err, response));
    5. rcon.end();
     
Thread Status:
Not open for further replies.

Share This Page