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 BackupManager
Get the backup manager instancedefault @NonNull ChunkManager
Get theChunkManager
implementation for the platformGet the platform specific consoleAudience
void
Load the caption mapsdefault @NonNull IndependentPlotGenerator
Usually HybridGendefault @NonNull EconHandler
Get theEconHandler
implementation for the platformdefault @NonNull ExpireManager
Get theExpireManager
implementation 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 GlobalBlockQueue
Get the global block queue implementationdefault @NonNull HybridUtils
Get theHybridUtils
implementation for the platforminjector()
Get theInjector
instance used by PlotSquareddefault boolean
Returns if the FastAsyncWorldEdit-PlotSquared hook is active/enableddefault @NonNull PermissionHandler
Get thePermissionHandler
implementation for the platformdefault @NonNull PlaceholderRegistry
Get thePlaceholderRegistry
implementationdefault @NonNull PlayerManager
<? extends PlotPlayer<P>, ? extends P> Get the player manager implementation for the platformGet thePlotAreaManager
implementation.Get the name of the pluginGet a formatted string containing all plugins on the server together with plugin metadata.default @NonNull RegionManager
Get theRegionManager
implementation for the platformGets 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.ServicePipeline
Get theServicePipeline
implementationvoid
setGenerator
(@NonNull String world) If a world is already loaded, set the generator (use NMS if required).default @NonNull SetupUtils
Get theSetupUtils
implementation for the platformvoid
shutdown()
Completely shuts down the plugin.void
Completely shuts down the server.void
Start Metrics.toLegacyPlatformString
(@NonNull Component component) Convert a component to a legacy stringvoid
unregister
(@NonNull PlotPlayer<?> player) Unregisters aPlotPlayer
from cache e.g.int
Gets the default maximum world height for the version of Minecraft that the server is running.int
Gets 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
-
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 aPlotPlayer
from 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 theInjector
instance 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 theHybridUtils
implementation for the platform- Returns:
- Hybrid utils
-
setupUtils
Get theSetupUtils
implementation for the platform- Returns:
- Setup utils
-
econHandler
Get theEconHandler
implementation for the platform- Returns:
- Econ handler
-
regionManager
Get theRegionManager
implementation for the platform- Returns:
- Region manager
-
chunkManager
Get theChunkManager
implementation for the platform- Returns:
- Region manager
-
expireManager
Get theExpireManager
implementation for the platform- Returns:
- Expire manager
- Since:
- 6.10.2
-
plotAreaManager
Get thePlotAreaManager
implementation.- 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 thePermissionHandler
implementation for the platform- Returns:
- Permission handler
-
servicePipeline
Get theServicePipeline
implementation- Returns:
- Service pipeline
-
placeholderRegistry
Get thePlaceholderRegistry
implementation- 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
-