Package com.plotsquared.core
Interface PlotPlatform<P>
- Type Parameters:
P- Player type
- All Superinterfaces:
LocaleHolder
PlotSquared main utility class
-
Method Summary
Modifier and TypeMethodDescriptiondefault @NonNull BackupManagerGet the backup manager instancedefault @NonNull ChunkManagerGet theChunkManagerimplementation for the platformGet the platform specific consoleAudiencevoidLoad the caption mapsdefault @NonNull IndependentPlotGeneratorUsually HybridGendefault @NonNull EconHandlerGet theEconHandlerimplementation for the platformdefault @NonNull ExpireManagerGet theExpireManagerimplementation for the platformGets the directory which contains PlotSquared files.getGenerator(@NonNull String world, @Nullable String name) Gets the generator wrapper for a world (world) and generator (name).getPlatformWorld(@NonNull String worldName) Get a platform world wrapper from a world namedefault @NonNull GlobalBlockQueueGet the global block queue implementationdefault @NonNull HybridUtilsGet theHybridUtilsimplementation for the platforminjector()Get theInjectorinstance used by PlotSquareddefault booleanReturns if the FastAsyncWorldEdit-PlotSquared hook is active/enableddefault @NonNull PermissionHandlerGet thePermissionHandlerimplementation for the platformdefault @NonNull PlaceholderRegistryGet thePlaceholderRegistryimplementationdefault @NonNull PlayerManager<? extends PlotPlayer<P>, ? extends P> Get the player manager implementation for the platformGet thePlotAreaManagerimplementation.Get the name of the pluginGet a formatted string containing all plugins on the server together with plugin metadata.default @NonNull RegionManagerGet theRegionManagerimplementation for the platformGets the server brand nameGets the server implementation name and versionGets the native server code package prefix.int[]Gets the version of Minecraft that is runningdefault @NonNull cloud.commandframework.services.ServicePipelineGet theServicePipelineimplementationvoidsetGenerator(@NonNull String world) If a world is already loaded, set the generator (use NMS if required).default @NonNull SetupUtilsGet theSetupUtilsimplementation for the platformvoidshutdown()Completely shuts down the plugin.voidCompletely shuts down the server.voidStart Metrics.toLegacyPlatformString(@NonNull Component component) Convert a component to a legacy stringvoidunregister(@NonNull PlotPlayer<?> player) Unregisters aPlotPlayerfrom cache e.g.intGets the default maximum world height for the version of Minecraft that the server is running.intGets the default minimum world height for the version of Minecraft that the server is running.Gets the folder where all world data is stored.Get the kind of WorldEdit implementationdefault @NonNull PlatformWorldManager<?> Get the platform specific world managerGet the world utility implementationwrapPlotGenerator(@NonNull String world, @NonNull IndependentPlotGenerator generator) Create a platform generator from a plot generatorMethods inherited from interface com.plotsquared.core.configuration.caption.LocaleHolder
getLocale, setLocale
-
Method Details
-
getDirectory
Gets the directory which contains PlotSquared files. The directory may not exist.- Returns:
- the PlotSquared directory
-
worldContainer
Gets the folder where all world data is stored.- Returns:
- the world folder
-
shutdown
void shutdown()Completely shuts down the plugin. -
shutdownServer
void shutdownServer()Completely shuts down the server. -
pluginName
Get the name of the plugin- Returns:
- Plugin name
-
serverVersion
int[] serverVersion()Gets the version of Minecraft that is running- Returns:
- server version as array of numbers
-
versionMinHeight
int versionMinHeight()Gets the default minimum world height for the version of Minecraft that the server is running.- Returns:
- minimum world height
- Since:
- 6.6.0
-
versionMaxHeight
int versionMaxHeight()Gets the default maximum world height for the version of Minecraft that the server is running.- Returns:
- maximum world height (inclusive)
- Since:
- 6.6.0
-
serverImplementation
Gets the server implementation name and version- Returns:
- server implementation and version as string
-
serverBrand
Gets the server brand name- Returns:
- server brand
- Since:
- 7.5.3
-
serverNativePackage
Gets the native server code package prefix.- Returns:
- The package prefix
-
startMetrics
void startMetrics()Start Metrics. -
setGenerator
If a world is already loaded, set the generator (use NMS if required).- Parameters:
world- The world to set the generator
-
unregister
Unregisters aPlotPlayerfrom cache e.g. if they have logged off.- Parameters:
player- the player to remove
-
getGenerator
Gets the generator wrapper for a world (world) and generator (name).- Parameters:
world- The world to get the generator fromname- The name of the generator- Returns:
- The generator being used for the provided world
-
wrapPlotGenerator
@NonNull GeneratorWrapper<?> wrapPlotGenerator(@NonNull String world, @NonNull IndependentPlotGenerator generator) Create a platform generator from a plot generator- Parameters:
world- World namegenerator- Plot generator- Returns:
- Platform generator wrapper
-
defaultGenerator
Usually HybridGen- Returns:
- Default implementation generator
-
backupManager
Get the backup manager instance- Returns:
- Backup manager
-
worldManager
Get the platform specific world manager- Returns:
- World manager
-
playerManager
Get the player manager implementation for the platform- Returns:
- Player manager
-
getPlatformWorld
Get a platform world wrapper from a world name- Parameters:
worldName- World name- Returns:
- Platform world wrapper
-
injector
Get theInjectorinstance used by PlotSquared- Returns:
- Injector instance
-
worldUtil
Get the world utility implementation- Returns:
- World utility
-
globalBlockQueue
Get the global block queue implementation- Returns:
- Global block queue implementation
-
hybridUtils
Get theHybridUtilsimplementation for the platform- Returns:
- Hybrid utils
-
setupUtils
Get theSetupUtilsimplementation for the platform- Returns:
- Setup utils
-
econHandler
Get theEconHandlerimplementation for the platform- Returns:
- Econ handler
-
regionManager
Get theRegionManagerimplementation for the platform- Returns:
- Region manager
-
chunkManager
Get theChunkManagerimplementation for the platform- Returns:
- Region manager
-
expireManager
Get theExpireManagerimplementation for the platform- Returns:
- Expire manager
- Since:
- 6.10.2
-
plotAreaManager
Get thePlotAreaManagerimplementation.- Returns:
- the PlotAreaManager
- Since:
- 6.1.4
-
consoleAudience
Get the platform specific consoleAudience- Returns:
- Console audience
-
pluginsFormatted
Get a formatted string containing all plugins on the server together with plugin metadata. Mainly for use in debug pastes- Returns:
- Formatted string
-
worldEditImplementations
Get the kind of WorldEdit implementation- Returns:
- worldedit implementations
- Since:
- 6.3.0
-
copyCaptionMaps
void copyCaptionMaps()Load the caption maps -
permissionHandler
Get thePermissionHandlerimplementation for the platform- Returns:
- Permission handler
-
servicePipeline
Get theServicePipelineimplementation- Returns:
- Service pipeline
-
placeholderRegistry
Get thePlaceholderRegistryimplementation- Returns:
- Placeholder registry
-
toLegacyPlatformString
Convert a component to a legacy string- Parameters:
component- Component to convert- Returns:
- Converted string
-
isFaweHooking
Returns if the FastAsyncWorldEdit-PlotSquared hook is active/enabled- Returns:
- status of FastAsyncWorldEdit-PlotSquared hook
-