Added server methods required to support RemoteBukkit:
* getPort() * getIP() * getServerName() * dispatchCommand(...)
This commit is contained in:
parent
c47efb4986
commit
2a87759443
@ -6,6 +6,7 @@ import java.util.List;
|
|||||||
import java.util.logging.Logger;
|
import java.util.logging.Logger;
|
||||||
import org.bukkit.command.PluginCommand;
|
import org.bukkit.command.PluginCommand;
|
||||||
|
|
||||||
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.plugin.PluginManager;
|
import org.bukkit.plugin.PluginManager;
|
||||||
import org.bukkit.scheduler.BukkitScheduler;
|
import org.bukkit.scheduler.BukkitScheduler;
|
||||||
|
|
||||||
@ -41,6 +42,27 @@ public interface Server {
|
|||||||
*/
|
*/
|
||||||
public int getMaxPlayers();
|
public int getMaxPlayers();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the game port that the server runs on
|
||||||
|
*
|
||||||
|
* @return The port number of this servers
|
||||||
|
*/
|
||||||
|
public int getPort();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the IP that this server is bound to or empty string if not specified
|
||||||
|
*
|
||||||
|
* @return The IP string that this server is bound to, otherwise empty string
|
||||||
|
*/
|
||||||
|
public String getIp();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the name of this server
|
||||||
|
*
|
||||||
|
* @return The name of this server
|
||||||
|
*/
|
||||||
|
public String getServerName();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Broadcast a message to all players.
|
* Broadcast a message to all players.
|
||||||
*
|
*
|
||||||
@ -135,4 +157,13 @@ public interface Server {
|
|||||||
* Writes loaded players to disk
|
* Writes loaded players to disk
|
||||||
*/
|
*/
|
||||||
public void savePlayers();
|
public void savePlayers();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Dispatches a command on the server, and executes it if found.
|
||||||
|
*
|
||||||
|
* @param cmdLine command + arguments. Example: "test abc 123"
|
||||||
|
* @return targetFound returns false if no target is found.
|
||||||
|
* @throws CommandException Thrown when the executor for the given command fails with an unhandled exception
|
||||||
|
*/
|
||||||
|
public boolean dispatchCommand(CommandSender sender, String commandLine);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user