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 platform@NonNull net.kyori.adventure.audience.Audience
Get the platform specific consoleAudience
void
Load the caption mapsdefault @NonNull IndependentPlotGenerator
Usually HybridGendefault @NonNull EconHandler
Get theEconHandler
implementation for the platform@NonNull File
Gets 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 GlobalBlockQueue
Get the global block queue implementationdefault @NonNull HybridUtils
Get theHybridUtils
implementation for the platform@NonNull com.google.inject.Injector
injector()
Get theInjector
instance used by PlotSquareddefault boolean
Returns if the FAWE-P2 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 platform@NonNull PlotAreaManager
Get thePlotAreaManager
implementation.default @NonNull String
Get the name of the plugin@NonNull String
Get a formatted string containing all plugins on the server together with plugin metadata.default @NonNull RegionManager
Get theRegionManager
implementation for the platform@NonNull String
Gets the server implementation name and version@NonNull String
Gets the native server code package prefix.int[]
Gets the version of Minecraft that is runningdefault @NonNull com.intellectualsites.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
Start Metrics.@NonNull String
toLegacyPlatformString(@NonNull net.kyori.adventure.text.Component component)
Convert a component to a legacy stringvoid
unregister(@NonNull PlotPlayer<?> player)
Unregisters aPlotPlayer
from cache e.g.@NonNull File
Gets the folder where all world data is stored.default @NonNull PlatformWorldManager<?>
Get the platform specific world managerdefault @NonNull WorldUtil
Get 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 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
@NonNull com.google.inject.Injector 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
-
plotAreaManager
@NonNull PlotAreaManager plotAreaManager()Get thePlotAreaManager
implementation.- Returns:
- the PlotAreaManager
-
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 thePermissionHandler
implementation for the platform- Returns:
- Permission handler
-
servicePipeline
default @NonNull com.intellectualsites.services.ServicePipeline 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
default boolean isFaweHooking()Returns if the FAWE-P2 hook is active/enabled- Returns:
- status of FAWE-P2 hook
-