| Constructor and Description |
|---|
PlatformManager(WorldEdit worldEdit)
Create a new platform manager.
|
| Modifier and Type | Method and Description |
|---|---|
<T extends Actor> |
createProxyActor(T base)
Given an actor, return a new one that may use a different platform
for permissions and world editing.
|
CommandManager |
getCommandManager()
Get the command manager.
|
LocalConfiguration |
getConfiguration()
Get the current configuration.
|
List<Platform> |
getPlatforms()
Get a list of loaded platforms.
|
ServerInterface |
getServerInterface()
Return a legacy
ServerInterface. |
World |
getWorldForEditing(World base)
Given a world, possibly return the same world but using a different
platform preferred for world editing operations.
|
void |
handleBlockInteract(BlockInteractEvent event) |
void |
handlePlatformReady(PlatformReadyEvent event) |
void |
handlePlayerInput(PlayerInputEvent event) |
Platform |
queryCapability(Capability capability)
Get the preferred platform for handling a certain capability.
|
void |
register(Platform platform)
Register a platform with WorldEdit.
|
boolean |
unregister(Platform platform)
Unregister a platform from WorldEdit.
|
public PlatformManager(WorldEdit worldEdit)
worldEdit - the WorldEdit instancepublic void register(Platform platform)
platform - the platformpublic boolean unregister(Platform platform)
If the platform has been chosen for any capabilities, then a new platform will be found.
platform - the platformpublic Platform queryCapability(Capability capability) throws NoCapablePlatformException
capability - the capabilityNoCapablePlatformException - thrown if no platform is capablepublic List<Platform> getPlatforms()
The returned list is a copy of the original and is mutable.
public World getWorldForEditing(World base)
base - the world to matchpublic <T extends Actor> T createProxyActor(T base)
base - the base actor to matchpublic CommandManager getCommandManager()
public LocalConfiguration getConfiguration()
If no platform has been registered yet, then a default configuration will be returned.
public ServerInterface getServerInterface() throws IllegalStateException
ServerInterface.ServerInterfaceIllegalStateException - if no platform has been registeredpublic void handlePlatformReady(PlatformReadyEvent event)
public void handleBlockInteract(BlockInteractEvent event)
public void handlePlayerInput(PlayerInputEvent event)
Copyright © 2010-2014. All Rights Reserved.