⚙️
T-MiniGameAPI
WebsiteDiscord
2.0.0-beta1
2.0.0-beta1
  • 🏠Home
  • 💻Maven and Gradle
  • 📦Minigame setup
  • 🖱️Plugins are using this libarary
  • Basic features
    • 🗺️Configuration
      • 🎯Configurators
      • 🔴Override Configuartors
    • 🖱️Commands - Deprecated
      • 🧔Parent commands
      • 🧒Sub commands
      • 📑Tab completer
      • ®️Command registration
    • 🧑Models
      • 📦File model
        • 🟢Single file
        • 🟠Many files
      • 💡DB model - Deprecated
      • 🧑‍🦱Users
    • 📔Loaders
      • 📗Loader
        • 📂File loader
        • 💾Database loader - Deprecated
    • 💬Library commands - Deprecated
  • Minigame features
    • 🅰️Arena system
      • 🟢Arena
      • 🔵ArenaManager
    • 🎮Game system
      • 🔴Game Manager
      • 🔵Game State
      • 🟡Users in game
      • 🟢Teams
    • ⏰Timers
      • 😀SimpleTimer
      • ✨XpTimer
    • 🪙Coins system
      • 🟢UserCoins
      • 🔵UserCoinsManager
    • ✨Statistics system
      • 🟢Default statistics system
      • 🔵Your own statistics system
    • 💥Cosmetics system
      • 📀Cosmetic
        • 💕ParticleCosmetic
      • ✳️Cosmetics Manager
      • 🧒Users' cosmetics
        • 💿UserCosmeticsManager
        • ✅UserCosmetics
  • Addons - Deprecated
    • 🎁What is addon?
    • 🖍️How to create addon?
    • 📃Addons list
  • Modules
    • 🔌What is module ?
    • 🗒️Modules list
    • 💾How to create module?
Powered by GitBook
On this page
  1. Modules

🔌What is module ?

PreviousAddons listNextModules list
CtrlK

The module is a separated JAR which adds more functions to core library.

Module must be shade in your plugin JAR, thanks to maven or gradle.

Every module must be registered in configure method in your Main class.

How to register module?

Module can be registered in two ways.

  1. Simple module registration, by put new instance of module to registerModules method

  2. Load before others modules, but put new instance of module in to constructor of LibraryConfiguration class.

The first way:

    @Override
    protected LibraryConfiguration configure() {
        return new LibraryConfiguration(this, getConfiguratorsInitializer())
                .builder()
                .setGameManager(new MyGameManager(this,

The second way:

This way to register module, must be used rarely, only in exceptional situations.

    @Override
    protected LibraryConfiguration configure() {
        commandsModule = new CommandsModule(this);
        return new LibraryConfiguration(this, getConfiguratorsInitializer()
                , Arrays.asList(new MyModule(), new MySecondModule()))
                .builder()
                .setGameManager(new MyGameManager(this, settings, messages))
                .build();
    }
settings
,
messages)
)
.registerModules(new MyModule(), new MySecondModule())
.build();
}