    001package net.minecraft.network.rcon;
    002
    003public interface IServer
    004{
    005    /**
    006     * Gets an integer property. If it does not exist, set it to the specified value.
    007     */
    008    int getIntProperty(String var1, int var2);
    009
    010    /**
    011     * Gets a string property. If it does not exist, set it to the specified value.
    012     */
    013    String getStringProperty(String var1, String var2);
    014
    015    /**
    016     * Saves an Object with the given property name.
    017     */
    018    void setProperty(String var1, Object var2);
    019
    020    /**
    021     * Saves all of the server properties to the properties file.
    022     */
    023    void saveProperties();
    024
    025    /**
    026     * Returns the filename where server properties are stored
    027     */
    028    String getSettingsFilename();
    029
    030    /**
    031     * Returns the server's hostname.
    032     */
    033    String getHostname();
    034
    035    /**
    036     * Never used, but "getServerPort" is already taken.
    037     */
    038    int getPort();
    039
    040    /**
    041     * Returns the server message of the day
    042     */
    043    String getServerMOTD();
    044
    045    /**
    046     * Returns the server's Minecraft version as string.
    047     */
    048    String getMinecraftVersion();
    049
    050    /**
    051     * Returns the number of players currently on the server.
    052     */
    053    int getCurrentPlayerCount();
    054
    055    /**
    056     * Returns the maximum number of players allowed on the server.
    057     */
    058    int getMaxPlayers();
    059
    060    /**
    061     * Returns an array of the usernames of all the connected players.
    062     */
    063    String[] getAllUsernames();
    064
    065    String getFolderName();
    066
    067    /**
    068     * Used by RCon's Query in the form of "MajorServerMod 1.2.3: MyPlugin 1.3; AnotherPlugin 2.1; AndSoForth 1.0".
    069     */
    070    String getPlugins();
    071
    072    String executeCommand(String var1);
    073
    074    /**
    075     * Returns true if debugging is enabled, false otherwise.
    076     */
    077    boolean isDebuggingEnabled();
    078
    079    /**
    080     * Logs the message with a level of INFO.
    081     */
    082    void logInfo(String var1);
    083
    084    /**
    085     * Logs the message with a level of WARN.
    086     */
    087    void logWarning(String var1);
    088
    089    /**
    090     * Logs the error message with a level of SEVERE.
    091     */
    092    void logSevere(String var1);
    093
    094    /**
    095     * If isDebuggingEnabled(), logs the message with a level of INFO.
    096     */
    097    void logDebug(String var1);
    098}