Interface PlotPlatform<P>

Type Parameters:
P - Player type
All Superinterfaces:
LocaleHolder

public interface PlotPlatform<P> extends LocaleHolder
PlotSquared main utility class
  • 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

      default @NonNull String 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

      void setGenerator(@NonNull String world)
      If a world is already loaded, set the generator (use NMS if required).
      Parameters:
      world - The world to set the generator
    • unregister

      void unregister(@NonNull PlotPlayer<?> player)
      Unregisters a PlotPlayer from cache e.g. if they have logged off.
      Parameters:
      player - the player to remove
    • getGenerator

      @Nullable GeneratorWrapper<?> getGenerator(@NonNull String world, @Nullable String name)
      Gets the generator wrapper for a world (world) and generator (name).
      Parameters:
      world - The world to get the generator from
      name - 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 name
      generator - Plot generator
      Returns:
      Platform generator wrapper
    • defaultGenerator

      default @NonNull IndependentPlotGenerator defaultGenerator()
      Usually HybridGen
      Returns:
      Default implementation generator
    • backupManager

      default @NonNull BackupManager backupManager()
      Get the backup manager instance
      Returns:
      Backup manager
    • worldManager

      default @NonNull PlatformWorldManager<?> worldManager()
      Get the platform specific world manager
      Returns:
      World manager
    • playerManager

      default @NonNull PlayerManager<? extends PlotPlayer<P>,​? extends P> playerManager()
      Get the player manager implementation for the platform
      Returns:
      Player manager
    • getPlatformWorld

      @Nullable World<?> getPlatformWorld(@NonNull String worldName)
      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 the Injector instance used by PlotSquared
      Returns:
      Injector instance
    • worldUtil

      default @NonNull WorldUtil worldUtil()
      Get the world utility implementation
      Returns:
      World utility
    • globalBlockQueue

      default @NonNull GlobalBlockQueue globalBlockQueue()
      Get the global block queue implementation
      Returns:
      Global block queue implementation
    • hybridUtils

      default @NonNull HybridUtils hybridUtils()
      Get the HybridUtils implementation for the platform
      Returns:
      Hybrid utils
    • setupUtils

      default @NonNull SetupUtils setupUtils()
      Get the SetupUtils implementation for the platform
      Returns:
      Setup utils
    • econHandler

      default @NonNull EconHandler econHandler()
      Get the EconHandler implementation for the platform
      Returns:
      Econ handler
    • regionManager

      default @NonNull RegionManager regionManager()
      Get the RegionManager implementation for the platform
      Returns:
      Region manager
    • chunkManager

      default @NonNull ChunkManager chunkManager()
      Get the ChunkManager implementation for the platform
      Returns:
      Region manager
    • plotAreaManager

      @NonNull PlotAreaManager plotAreaManager()
      Get the PlotAreaManager implementation.
      Returns:
      the PlotAreaManager
    • consoleAudience

      @NonNull net.kyori.adventure.audience.Audience consoleAudience()
      Get the platform specific console Audience
      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

      default @NonNull PermissionHandler permissionHandler()
      Get the PermissionHandler implementation for the platform
      Returns:
      Permission handler
    • servicePipeline

      default @NonNull com.intellectualsites.services.ServicePipeline servicePipeline()
      Get the ServicePipeline implementation
      Returns:
      Service pipeline
    • placeholderRegistry

      default @NonNull PlaceholderRegistry placeholderRegistry()
      Get the PlaceholderRegistry implementation
      Returns:
      Placeholder registry
    • toLegacyPlatformString

      @NonNull String toLegacyPlatformString(@NonNull net.kyori.adventure.text.Component component)
      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