⚙️
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. Basic features
  2. Commands - Deprecated

Sub commands

Every sub-command must be registered in the parent command class.

Every sub-command must implement SubCommand interface.

The sub-command has two methods:

  • executeCommand - executes subcommand

  • getName - gets sub-command name

The whole implementation of the sub-command class.

public class MySubCommand implements SubCommand {

    @Override
    public boolean executeCommand(CommandSender sender, String[] args) {
        Player player = (Player) sender;

        player.sendMessage("my sub command");
        
        return false;
    }

    @Override
    public String getName() {
        return "mysubcommand";
    }
}
PreviousParent commandsNextTab completer
🖱️
🧒