Class TachyonCore

java.lang.Object
org.bukkit.plugin.PluginBase
org.bukkit.plugin.java.JavaPlugin
tech.skworks.tachyon.plugin.spigot.TachyonCore
All Implemented Interfaces:
org.bukkit.command.CommandExecutor, org.bukkit.command.TabCompleter, org.bukkit.command.TabExecutor, org.bukkit.plugin.Plugin, TachyonAPI<org.bukkit.inventory.ItemStack>

public class TachyonCore extends org.bukkit.plugin.java.JavaPlugin implements TachyonAPI<org.bukkit.inventory.ItemStack>
Project Tachyon Class TachyonCore
Since:
1.0.0-SNAPSHOT
Version:
1.0
Author:
Jimmy (vSKAH) - 05/04/2026
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    Retrieves the auditing service used to dispatch player actions and security events to the backend.
    ComponentRegistry<org.bukkit.inventory.ItemStack>
    Retrieves the central component registry used to manage Protobuf descriptors and UI preview handlers.
    EventBus<org.bukkit.plugin.java.JavaPlugin>
    Retrieves the central asynchronous event bus used to dispatch and handle Tachyon events.
    getModuleLogger(@NotNull String moduleName)
     
    Retrieves the service dedicated to raw player data manipulation and synchronization.
    Retrieves the service responsible for managing active player sessions across the network.
     
    Retrieves the snapshot service used to trigger database backups, point-in-time recoveries, and to query snapshot histories.
    Retrieves the system service handling core backend connectivity and global states.
    Retrieves the registry responsible for managing live player profiles.
    void
     
    void
     
    boolean
    Checks if the Tachyon core system is currently in its shutdown phase.

    Methods inherited from class org.bukkit.plugin.java.JavaPlugin

    getClassLoader, getCommand, getConfig, getDatabase, getDatabaseClasses, getDataFolder, getDefaultWorldGenerator, getDescription, getFile, getLogger, getPlugin, getPluginLoader, getProvidingPlugin, getResource, getServer, getTextResource, initialize, installDDL, isEnabled, isInitialized, isNaggable, onCommand, onLoad, onTabComplete, reloadConfig, removeDDL, saveConfig, saveDefaultConfig, saveResource, setEnabled, setNaggable, toString

    Methods inherited from class org.bukkit.plugin.PluginBase

    equals, getName, hashCode

    Methods inherited from class Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • TachyonCore

      public TachyonCore()
  • Method Details

    • onEnable

      public void onEnable()
      Specified by:
      onEnable in interface org.bukkit.plugin.Plugin
      Overrides:
      onEnable in class org.bukkit.plugin.java.JavaPlugin
    • onDisable

      public void onDisable()
      Specified by:
      onDisable in interface org.bukkit.plugin.Plugin
      Overrides:
      onDisable in class org.bukkit.plugin.java.JavaPlugin
    • getModuleLogger

      public static TachyonLogger getModuleLogger(@NotNull @NotNull String moduleName)
    • getTachyonProfileRegistry

      public TachyonProfileRegistry getTachyonProfileRegistry()
      Description copied from interface: TachyonAPI
      Retrieves the registry responsible for managing live player profiles.

      Used to access, load, or manipulate active TachyonProfile instances that are currently cached in the server's memory.

      Specified by:
      getTachyonProfileRegistry in interface TachyonAPI<org.bukkit.inventory.ItemStack>
      Returns:
      The active TachyonProfileRegistry instance.
    • getComponentRegistry

      public ComponentRegistry<org.bukkit.inventory.ItemStack> getComponentRegistry()
      Description copied from interface: TachyonAPI
      Retrieves the central component registry used to manage Protobuf descriptors and UI preview handlers.

      This registry is essential for registering new custom data components when your specific plugin or module initializes during server startup.

      Specified by:
      getComponentRegistry in interface TachyonAPI<org.bukkit.inventory.ItemStack>
      Returns:
      The active ComponentRegistry instance.
    • getSystemService

      public SystemService getSystemService()
      Description copied from interface: TachyonAPI
      Retrieves the system service handling core backend connectivity and global states.

      This service manages low-level operations such as back-end ping.

      Specified by:
      getSystemService in interface TachyonAPI<org.bukkit.inventory.ItemStack>
      Returns:
      The active SystemService instance.
    • getAuditService

      public AuditService getAuditService()
      Description copied from interface: TachyonAPI
      Retrieves the auditing service used to dispatch player actions and security events to the backend.
      Specified by:
      getAuditService in interface TachyonAPI<org.bukkit.inventory.ItemStack>
      Returns:
      The active AuditService instance.
    • getSnapshotService

      public SnapshotService getSnapshotService()
      Description copied from interface: TachyonAPI
      Retrieves the snapshot service used to trigger database backups, point-in-time recoveries, and to query snapshot histories.
      Specified by:
      getSnapshotService in interface TachyonAPI<org.bukkit.inventory.ItemStack>
      Returns:
      The active SnapshotService instance.
    • getPlayerSessionService

      public PlayerSessionService getPlayerSessionService()
      Description copied from interface: TachyonAPI
      Retrieves the service responsible for managing active player sessions across the network.

      This service handles keeping sessions alive by sending periodic heartbeats for loaded profiles, and provides mechanisms to unlock player profiles to prevent stuck sessions or cross-server locks.

      Specified by:
      getPlayerSessionService in interface TachyonAPI<org.bukkit.inventory.ItemStack>
      Returns:
      The active PlayerSessionService instance.
    • getPlayerDataService

      public PlayerDataService getPlayerDataService()
      Description copied from interface: TachyonAPI
      Retrieves the service dedicated to raw player data manipulation and synchronization.

      This service is utilized to pull profile data from the backend, asynchronously push profile updates (saves), and aggressively flush pending data queues for specific players.

      Specified by:
      getPlayerDataService in interface TachyonAPI<org.bukkit.inventory.ItemStack>
      Returns:
      The active PlayerDataService instance.
    • getEventBus

      public EventBus<org.bukkit.plugin.java.JavaPlugin> getEventBus()
      Description copied from interface: TachyonAPI
      Retrieves the central asynchronous event bus used to dispatch and handle Tachyon events.

      This event bus handles safe listener registration and high-performance, lock-free execution offloaded to a dedicated asynchronous thread pool.

      Specified by:
      getEventBus in interface TachyonAPI<org.bukkit.inventory.ItemStack>
      Returns:
      The active EventBus instance.
    • tachyonCoreDisabling

      public boolean tachyonCoreDisabling()
      Description copied from interface: TachyonAPI
      Checks if the Tachyon core system is currently in its shutdown phase.

      Best Practice: External plugins should check this boolean before initiating any new asynchronous gRPC calls, component saves, or heavy operations. If this returns true, it means the server is stopping and new backend requests should be aborted to prevent hanging threads or data corruption.

      Specified by:
      tachyonCoreDisabling in interface TachyonAPI<org.bukkit.inventory.ItemStack>
      Returns:
      true if the Tachyon plugin is actively disabling, false otherwise.
    • getPluginConfig

      public TachyonConfig getPluginConfig()