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 platform@NonNull net.kyori.adventure.audience.AudienceGet the platform specific consoleAudiencevoidLoad the caption mapsdefault @NonNull IndependentPlotGeneratorUsually HybridGendefault @NonNull EconHandlerGet theEconHandlerimplementation for the platform@NonNull FileGets the directory which contains PlotSquared files.@Nullable GeneratorWrapper<?>getGenerator(@NonNull String world, @Nullable String name)Gets the generator wrapper for a world (world) and generator (name).@Nullable World<?>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 platform@NonNull com.google.inject.Injectorinjector()Get theInjectorinstance used by PlotSquareddefault booleanReturns if the FAWE-P2 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 platformdefault @NonNull StringGet the name of the plugin@NonNull StringGet a formatted string containing all plugins on the server together with plugin metadata.default @NonNull RegionManagerGet theRegionManagerimplementation for the platform@NonNull StringGets the server implementation name and version@NonNull StringGets the native server code package prefix.int[]Gets the version of Minecraft that is runningdefault @NonNull com.intellectualsites.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.voidStart Metrics.@NonNull StringtoLegacyPlatformString(@NonNull net.kyori.adventure.text.Component component)Convert a component to a legacy stringvoidunregister(@NonNull PlotPlayer<?> player)Unregisters aPlotPlayerfrom cache e.g. if they have logged off.@NonNull FileGets the folder where all world data is stored.default @NonNull PlatformWorldManager<?>Get the platform specific world managerdefault @NonNull WorldUtilGet the world utility implementation@NonNull GeneratorWrapper<?>wrapPlotGenerator(@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
@NonNull File getDirectory()Gets the directory which contains PlotSquared files. The directory may not exist.- Returns:
- the PlotSquared directory
-
worldContainer
@NonNull File worldContainer()Gets the folder where all world data is stored.- Returns:
- the world folder
-
shutdown
void shutdown()Completely shuts down the plugin. -
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
-
serverImplementation
@NonNull String serverImplementation()Gets the server implementation name and version- Returns:
- server implementation and version as string
-
serverNativePackage
@NonNull 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 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
@NonNull com.google.inject.Injector 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
-
consoleAudience
@NonNull net.kyori.adventure.audience.Audience consoleAudience()Get the platform specific consoleAudience- Returns:
- Console audience
-
pluginsFormatted
@NonNull String pluginsFormatted()Get a formatted string containing all plugins on the server together with plugin metadata. Mainly for use in debug pastes- Returns:
- Formatted string
-
copyCaptionMaps
void copyCaptionMaps()Load the caption maps -
permissionHandler
Get thePermissionHandlerimplementation for the platform- Returns:
- Permission handler
-
servicePipeline
default @NonNull com.intellectualsites.services.ServicePipeline 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
default boolean isFaweHooking()Returns if the FAWE-P2 hook is active/enabled- Returns:
- status of FAWE-P2 hook
-