Add server health information to the Server type

Issue #2 open
Will Warren repo owner created an issue

Implement stuff suggested in this MineCenter bug: https://bitbucket.org/phybros/minecenter/issue/7/add-additional-server-health-information

The functionality should basically be the same information returned by the Essentials plugin's "/gc" command

Comments (5)

  1. Will Warren reporter

    Some more ideas:

    Create a new struct in the IDL file called ServerHealth and add a list of them to the Server struct.

    ServerHealth definition:

    struct ServerHealth {
        1: required string label, // e.g. Uptime, Memory Allocated
        2: string value,          // e.g. 1d 12h 34m 8s, 500MB
    }
    

    And then change the Server definition to:

    struct Server {
            1: string name,
            2: list<OfflinePlayer> offlinePlayers,
            // ... other properties omitted
    
            /**
             * Information about the server's overall health; memory usage,
             * cpu usage, uptime, chunk info etc.
             *
             * @since 1.7
             */
            16: list<ServerHealth> health,
    }
    

    Doing it this way ensures that we aren't adding any new methods to the (already huge) SwiftApi interface. Each new method increases the size by about 100KB. New properties increase the size a lot less.

  2. Log in to comment