public interface Platform
It is strongly recommended that implementations extend from
AbstractPlatform
.
Modifier and Type | Method and Description |
---|---|
java.util.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.
|
java.lang.String |
getPlatformName()
Get a friendly name of the platform.
|
java.lang.String |
getPlatformVersion()
Get the version of the platform, which can be anything.
|
Registries |
getRegistries()
Gets the registry holder.
|
java.lang.String |
getVersion()
Get the version of WorldEdit that this platform provides.
|
java.util.List<? extends World> |
getWorlds()
Get a list of available or loaded worlds.
|
boolean |
isValidMobType(java.lang.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 |
schedule(long delay,
long period,
java.lang.Runnable task)
Schedules the given
task to be invoked once every
period ticks after an initial delay of delay ticks. |
Registries getRegistries()
boolean isValidMobType(java.lang.String type)
type
- The mob type name to checkvoid reload()
int schedule(long delay, long period, java.lang.Runnable task)
task
to be invoked once every
period
ticks after an initial delay of delay
ticks.delay
- Delay in server ticks before executing first repeatperiod
- Period in server ticks of the tasktask
- Task to be executedjava.util.List<? extends World> getWorlds()
@Nullable Player matchPlayer(Player player)
The given player may have been provided by a different platform.
player
- the player to match@Nullable World matchWorld(World world)
The given world may have been provided by a different platform.
world
- the world to matchvoid registerCommands(Dispatcher dispatcher)
dispatcher
- the dispatchervoid registerGameHooks()
LocalConfiguration getConfiguration()
java.lang.String getVersion()
This version should match WorldEdit releases because it may be checked to match.
java.lang.String getPlatformName()
The name can be anything (reasonable). An example name may be "Bukkit" or "Forge".
java.lang.String getPlatformVersion()
java.util.Map<Capability,Preference> getCapabilities()