001 package net.minecraft.src;
002
003 public 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 String getSettingsFilePath();
026
027 /**
028 * Returns the server's hostname.
029 */
030 String getHostname();
031
032 /**
033 * Never used, but "getServerPort" is already taken.
034 */
035 int getPort();
036
037 /**
038 * minecraftServer.getMOTD is used in 2 places instead (it is a non-virtual function which returns the same thing)
039 */
040 String getServerMOTD();
041
042 /**
043 * Returns the server's Minecraft version as string.
044 */
045 String getMinecraftVersion();
046
047 /**
048 * Returns the number of players currently on the server.
049 */
050 int getCurrentPlayerCount();
051
052 /**
053 * Returns the maximum number of players allowed on the server.
054 */
055 int getMaxPlayers();
056
057 /**
058 * Returns an array of the usernames of all the connected players.
059 */
060 String[] getAllUsernames();
061
062 String getFolderName();
063
064 /**
065 * Used by RCon's Query in the form of "MajorServerMod 1.2.3: MyPlugin 1.3; AnotherPlugin 2.1; AndSoForth 1.0".
066 */
067 String getPlugins();
068
069 String executeCommand(String var1);
070
071 /**
072 * Returns true if debugging is enabled, false otherwise.
073 */
074 boolean isDebuggingEnabled();
075
076 /**
077 * Logs the message with a level of INFO.
078 */
079 void logInfo(String var1);
080
081 /**
082 * Logs the message with a level of WARN.
083 */
084 void logWarning(String var1);
085
086 /**
087 * Logs the error message with a level of SEVERE.
088 */
089 void logSevere(String var1);
090
091 /**
092 * If isDebuggingEnabled(), logs the message with a level of INFO.
093 */
094 void logDebug(String var1);
095 }