public class ServerInterfaceAdapter extends ServerInterface
Platforms into the legacy ServerInterface.| Modifier and Type | Method and Description |
|---|---|
static ServerInterface |
adapt(Platform platform)
Adapt an
Platform instance into a ServerInterface. |
Map<Capability,Preference> |
getCapabilities()
Get a map of advertised capabilities of this platform, where each key
in the given map is a supported capability and the respective value
indicates the preference for this platform for that given capability.
|
LocalConfiguration |
getConfiguration()
Get the configuration from this platform.
|
String |
getPlatformName()
Get a friendly name of the platform.
|
String |
getPlatformVersion()
Get the version of the platform, which can be anything.
|
String |
getVersion()
Get the version of WorldEdit that this platform provides.
|
List<? extends World> |
getWorlds()
Get a list of available or loaded worlds.
|
boolean |
isValidMobType(String type)
Checks if a mob type is valid.
|
Player |
matchPlayer(Player player)
Create a duplicate of the given player.
|
World |
matchWorld(World world)
Create a duplicate of the given world.
|
void |
registerCommands(Dispatcher dispatcher)
Register the commands contained within the given command dispatcher.
|
void |
registerGameHooks()
Register game hooks.
|
void |
reload()
Reload WorldEdit configuration.
|
int |
resolveItem(String name)
Resolves an item name to its ID.
|
int |
schedule(long delay,
long period,
Runnable task)
Schedules the given
task to be invoked once every
period ticks after an initial delay of delay ticks. |
public int resolveItem(String name)
Platformname - The name to look uppublic boolean isValidMobType(String type)
Platformtype - The mob type name to checkpublic void reload()
Platformpublic int schedule(long delay,
long period,
Runnable task)
Platformtask to be invoked once every
period ticks after an initial delay of delay ticks.schedule in interface Platformschedule in class AbstractPlatformdelay - Delay in server ticks before executing first repeatperiod - Period in server ticks of the tasktask - Task to be executedpublic List<? extends World> getWorlds()
PlatformgetWorlds in interface PlatformgetWorlds in class AbstractPlatform@Nullable public Player matchPlayer(Player player)
PlatformThe given player may have been provided by a different platform.
player - the player to match@Nullable public World matchWorld(World world)
PlatformThe given world may have been provided by a different platform.
world - the world to matchpublic void registerCommands(Dispatcher dispatcher)
Platformdispatcher - the dispatcherpublic void registerGameHooks()
Platformpublic LocalConfiguration getConfiguration()
Platformpublic String getVersion()
PlatformThis version should match WorldEdit releases because it may be checked to match.
public String getPlatformName()
PlatformThe name can be anything (reasonable). An example name may be "Bukkit" or "Forge".
public String getPlatformVersion()
Platformpublic Map<Capability,Preference> getCapabilities()
Platformpublic static ServerInterface adapt(Platform platform)
Platform instance into a ServerInterface.platform - the platformCopyright © 2010-2014. All Rights Reserved.