/** * Get the current configuration. * * <p>If no platform has been registered yet, then a default configuration * will be returned.</p> * * @return the configuration */ public LocalConfiguration getConfiguration() { return queryCapability(Capability.CONFIGURATION).getConfiguration(); }
@Override void unload(PlatformManager platformManager, Platform platform) { platformManager.getCommandManager().unregister(); } },
@Override void initialize(PlatformManager platformManager, Platform platform) { platformManager.getCommandManager().register(platform); }
/** * Given a world, possibly return the same world but using a different * platform preferred for world editing operations. * * @param base the world to match * @return the preferred world, if one was found, otherwise the given world */ public World getWorldForEditing(World base) { checkNotNull(base); World match = queryCapability(Capability.WORLD_EDITING).matchWorld(base); return match != null ? match : base; }
@Override public boolean canUse(Actor player) { return player.hasPermission("worldedit.tool.deltree"); }
/** * Gets the display name of the actor. This can be a nickname, and is not guaranteed to be unique. * * @return The display name */ default String getDisplayName() { return getName(); }
@Override public void run() { sender.printDebug(message); }
@Override public File openFileSaveDialog(String[] extensions) { printError("File dialogs are not supported in your environment."); return null; }
@Override public boolean ascendUpwards(int distance) { return ascendUpwards(distance, true); }
@Override public Direction getCardinalDirection() { return getCardinalDirection(0); }
@Override public void dispatchCUIEvent(CUIEvent event) { cuiActor.dispatchCUIEvent(event); }
@Override public boolean canDestroyBedrock() { return hasPermission("worldedit.override.bedrock"); }
@Override void initialize(PlatformManager platformManager, Platform platform) { platform.registerGameHooks(); }
@Override public String[] getGroups() { return permActor.getGroups(); }
@Override public boolean canUse(Actor player) { return player.hasPermission("worldedit.tool.replacer"); }
@Override public File openFileOpenDialog(String[] extensions) { printError("File dialogs are not supported in your environment."); return null; }
@Override public boolean canUse(Actor player) { return player.hasPermission(permission); }
@Override public boolean canUse(Actor player) { return player.hasPermission("worldedit.tool.data-cycler"); }
@Override public boolean hasPermission(String perm) { return permActor.hasPermission(perm); }
@Override public boolean canUse(Actor player) { return player.hasPermission("worldedit.superpickaxe.area"); }