Class OpenCreative

java.lang.Object
org.bukkit.plugin.PluginBase
org.bukkit.plugin.java.JavaPlugin
ua.mcchickenstudio.opencreative.OpenCreative
All Implemented Interfaces:
io.papermc.paper.plugin.lifecycle.event.LifecycleEventOwner, org.bukkit.command.CommandExecutor, org.bukkit.command.TabCompleter, org.bukkit.command.TabExecutor, org.bukkit.plugin.Plugin

public final class OpenCreative extends org.bukkit.plugin.java.JavaPlugin
This class represents OpenCreative+ java plugin for PaperMC. Only for loading, enabling and disabling plugin. Contains general information about plugin's version and codename.
Author:
McChicken Studio
  • Constructor Details

    • OpenCreative

      public OpenCreative()
  • Method Details

    • onLoad

      public void onLoad()
      Plugin load operations.
      Specified by:
      onLoad in interface org.bukkit.plugin.Plugin
      Overrides:
      onLoad in class org.bukkit.plugin.java.JavaPlugin
      See Also:
    • onEnable

      public void onEnable()
      Plugin startup operations.

      Loads settings, registers commands and events, starts managers and notifies players about startup.

      Specified by:
      onEnable in interface org.bukkit.plugin.Plugin
      Overrides:
      onEnable in class org.bukkit.plugin.java.JavaPlugin
      See Also:
    • onDisable

      public void onDisable()
      Plugin shutdown operations.

      Unloads worlds when plugin is being disabled.

      Specified by:
      onDisable in interface org.bukkit.plugin.Plugin
      Overrides:
      onDisable in class org.bukkit.plugin.java.JavaPlugin
      See Also:
    • getPlugin

      @NotNull public static @NotNull OpenCreative getPlugin()
      Get a plugin instance for operations with it.

      Useful for accessing planets manager, or settings.

      Returns:
      plugin instance.
    • getSettings

      @NotNull public static @NotNull Settings getSettings()
      Returns OpenCreative+ settings.
      Returns:
      settings of plugin.
    • setEconomy

      public static void setEconomy(@NotNull @NotNull Economy economy)
      Sets custom economy manager.
      Parameters:
      economy - economy manager.
    • getEconomy

      public static Economy getEconomy()
      Gets economy manager, that has money operations for players.
      Returns:
      economy manager.
    • setPacketManager

      public static void setPacketManager(@NotNull @NotNull PacketManager packetManager)
      Sets custom packet manager.
      Parameters:
      packetManager - packet manager.
    • getPacketManager

      public static PacketManager getPacketManager()
      Gets packet manager, that has packets modifiers methods.
      Returns:
      packet manager.
    • setHintManager

      public static void setHintManager(@NotNull @NotNull HintManager hintManager)
      Sets custom hint manager.
      Parameters:
      hintManager - hint manager.
    • getHintManager

      public static HintManager getHintManager()
      Gets hint manager, that sends suggestions to players in action bar.
      Returns:
      hint manager.
    • setBlocksManager

      public static void setBlocksManager(@NotNull @NotNull BlocksManager blocksManager)
      Sets custom blocks manager.
      Parameters:
      blocksManager - blocks manager.
    • getBlocksManager

      public static BlocksManager getBlocksManager()
      Gets blocks manager, that changes a lot of blocks in world.
      Returns:
      blocks manager.
    • setBlocksManager

      public static void setBlocksManager(@NotNull @NotNull ModuleManager moduleManager)
      Sets custom module manager.
      Parameters:
      moduleManager - module manager.
    • getDisguiseManager

      public static DisguiseManager getDisguiseManager()
      Gets disguise manager, that disguises entities as players, other entities, blocks.
      Returns:
      disguise manager.
    • setDisguiseManager

      public static void setDisguiseManager(@NotNull @NotNull DisguiseManager disguiseManager)
      Sets custom disguise manager.
      Parameters:
      disguiseManager - disguise manager.
    • getModuleManager

      public static ModuleManager getModuleManager()
      Gets module manager, that creates or deletes modules.
      Returns:
      modules manager.
    • setDevPlatformer

      public static void setDevPlatformer(@NotNull @NotNull DevPlatformer platformsManager)
      Sets custom coding platforms manager.
      Parameters:
      platformsManager - developer platforms manager.
    • getDevPlatformer

      public static DevPlatformer getDevPlatformer()
      Gets coding platforms manager, that creates and manipulates with dev platforms in developer worlds.
      Returns:
      coding platforms manager.
    • setDownloadManager

      public static void setDownloadManager(@NotNull @NotNull DownloadManager downloadManager)
      Sets custom download manager.
      Parameters:
      downloadManager - download manager.
    • getDownloadManager

      public static DownloadManager getDownloadManager()
      Gets download manager, that uploads world acrhive and allows players to download it.
      Returns:
      download manager.
    • setCodingPrompter

      public static void setCodingPrompter(@NotNull @NotNull CodingPrompter codingPrompter)
      Sets custom coding prompt manager.
      Parameters:
      codingPrompter - coding prompter.
    • getCodingPrompter

      public static CodingPrompter getCodingPrompter()
      Gets coding prompt manager, that generates code by players prompts.
      Returns:
      coding prompter.
    • setPlanetsManager

      public static void setPlanetsManager(@NotNull @NotNull PlanetsManager planetsManager)
      Sets custom planets manager.
      Parameters:
      planetsManager - planets manager.
    • getPlanetsManager

      public static PlanetsManager getPlanetsManager()
      Gets planets manager, that stores planets in base and has methods to create, find and delete them.
      Returns:
      planets manager.
    • setStability

      public static void setStability(@NotNull @NotNull StabilityManager stabilityManager)
      Sets custom stability manager.
      Parameters:
      stabilityManager - stability manager.
    • getStability

      public static StabilityManager getStability()
      Gets stability manager, that checks server's performance and makes sure everything is fine.
      Returns:
      stability manager.
    • getVersion

      @NotNull public static @NotNull String getVersion()
      Gets version of OpenCreative+.
      Returns:
      version of plugin.
    • getUpdater

      public static Updater getUpdater()
      Gets update manager, that has methods to check available updates for plugin.
    • getCodename

      @NotNull public static @NotNull String getCodename()
      Gets codename of current OpenCreative+ version.
      Returns:
      codename of version.
    • registerWander

      @NotNull public @NotNull Wander registerWander(@NotNull @NotNull org.bukkit.entity.Player player)
    • unregisterWander

      public void unregisterWander(@NotNull @NotNull org.bukkit.entity.Player player)
    • getWander

      @Nullable public static @Nullable Wander getWander(@NotNull @NotNull UUID uuid)
      Returns online wander, that plays on server.
      Returns:
      wander - if online, otherwise - null
    • getWander

      @NotNull public static @NotNull Wander getWander(@NotNull @NotNull org.bukkit.entity.Player player)
      Returns online wander casted by player.
      Returns:
      wander of player.
    • getOfflineWander

      @NotNull public static @NotNull OfflineWander getOfflineWander(@NotNull @NotNull UUID uuid)
      Returns offline wander, that can be online or offline.
      Returns:
      offline wander.