Class ConfigSubCommand

java.lang.Object
com.karasu256.one_shot_glory.commands.subcommands.ConfigSubCommand
All Implemented Interfaces:
SubCommand

public class ConfigSubCommand extends Object implements SubCommand
プラグインの設定を参照・変更するサブコマンドを実装するクラス

このクラスはOne-Shot-Gloryプラグインの設定値を動的に確認したり 変更したりする機能を提供します。設定プロパティの値を取得したり、 新しい値を設定することができます。

  • Constructor Details

    • ConfigSubCommand

      public ConfigSubCommand()
      ReloadConfigSubCommandクラスのデフォルトコンストラクタ

      このクラスサブコマンドの実装を初期化します。

  • Method Details

    • execute

      public boolean execute(org.bukkit.command.CommandSender sender, String[] args)
      設定管理コマンドを実行するメソッド

      このメソッドは以下の操作を行います:

      • ユーザーの権限を確認
      • 引数が1つの場合は、指定されたプロパティの現在の値を表示
      • 引数が2つの場合は、指定されたプロパティに新しい値を設定
      • 値のタイプ(整数、真偽値、文字列)を自動判別
      Specified by:
      execute in interface SubCommand
      Parameters:
      sender - コマンドを実行した送信者
      args - コマンドの引数(プロパティ名と設定値)
      Returns:
      コマンドの実行が成功した場合はtrue
    • tabComplete

      public List<String> tabComplete(org.bukkit.command.CommandSender sender, String[] args)
      設定コマンドのタブ補完を提供するメソッド

      2番目の引数を入力中の場合は、利用可能な設定キーのリストを提供します。 権限がない場合や、他の引数位置では空のリストを返します。

      Specified by:
      tabComplete in interface SubCommand
      Parameters:
      sender - タブ補完を要求した送信者
      args - 現在入力されている引数
      Returns:
      補完候補の文字列リスト