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.
|
DataFixer |
getDataFixer()
Get a DataFixer capable of upgrading old data.
|
int |
getDataVersion()
Gets the Minecraft data version being used by the 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.
|
ResourceLoader |
getResourceLoader()
Return the resource loader.
|
java.util.Set<SideEffect> |
getSupportedSideEffects()
Get a set of
SideEffect s supported by this platform. |
TranslationManager |
getTranslationManager() |
java.lang.String |
getVersion()
Get the version of WorldEdit that this platform provides.
|
default Watchdog |
getWatchdog()
Get the watchdog service.
|
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(org.enginehub.piston.CommandManager commandManager)
Register the commands contained within the given command manager.
|
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. |
ResourceLoader getResourceLoader()
TranslationManager getTranslationManager()
Registries getRegistries()
int getDataVersion()
DataFixer getDataFixer()
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 executed@Nullable default Watchdog getWatchdog()
null
if nonejava.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(org.enginehub.piston.CommandManager commandManager)
commandManager
- the command managervoid 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()
java.util.Set<SideEffect> getSupportedSideEffects()
SideEffect
s supported by this platform.