Package com.karasu256.one_shot_glory
Class One_Shot_Glory
java.lang.Object
org.bukkit.plugin.PluginBase
org.bukkit.plugin.java.JavaPlugin
com.karasu256.one_shot_glory.One_Shot_Glory
- 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 One_Shot_Glory
extends org.bukkit.plugin.java.JavaPlugin
One-Shot-Gloryプラグインのメインクラス
このクラスはOne-Shot-Gloryプラグインのエントリーポイントとなり、 プラグインの初期化、設定ファイルの管理、および各種機能の制御を行います。
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic @NotNull org.bukkit.configuration.file.FileConfigurationプラグインの設定情報を保持する設定オブジェクト -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription言語マネージャーを取得するメソッドstatic org.bukkit.plugin.Pluginプラグインのインスタンスを取得するためのユーティリティメソッドvoid設定ファイルを再読み込みするメソッドvoidプラグインが無効化された際に呼び出されるメソッドvoidonEnable()プラグインが有効化された際に呼び出されるメソッドvoid設定ファイルを保存するメソッドMethods inherited from class org.bukkit.plugin.java.JavaPlugin
getClassLoader, getCommand, getConfig, getDataFolder, getDefaultBiomeProvider, getDefaultWorldGenerator, getDescription, getFile, getLifecycleManager, getLogger, getPlugin, getPluginLoader, getPluginMeta, getProvidingPlugin, getResource, getServer, getTextResource, init, init, isEnabled, isNaggable, onCommand, onLoad, onTabComplete, reloadConfig, saveDefaultConfig, saveResource, setEnabled, setNaggable, toStringMethods inherited from class org.bukkit.plugin.PluginBase
equals, getName, hashCodeMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.bukkit.plugin.Plugin
getComponentLogger, getDataPath, getLog4JLogger, getSLF4JLogger
-
Field Details
-
config
@NotNull public static @NotNull org.bukkit.configuration.file.FileConfiguration configプラグインの設定情報を保持する設定オブジェクト
-
-
Constructor Details
-
One_Shot_Glory
public One_Shot_Glory()
-
-
Method Details
-
onEnable
public void onEnable()プラグインが有効化された際に呼び出されるメソッドデータフォルダの作成、設定ファイルの初期化、言語マネージャーの初期化、 およびコマンドの登録などの初期化処理を行います。
- Specified by:
onEnablein interfaceorg.bukkit.plugin.Plugin- Overrides:
onEnablein classorg.bukkit.plugin.java.JavaPlugin
-
loadConfig
public void loadConfig()設定ファイルを再読み込みするメソッド設定ファイルの内容を最新の状態に更新します。
-
onDisable
public void onDisable()プラグインが無効化された際に呼び出されるメソッドイベントリスナーの登録解除や設定ファイルの保存など、 プラグインのシャットダウン処理を行います。
- Specified by:
onDisablein interfaceorg.bukkit.plugin.Plugin- Overrides:
onDisablein classorg.bukkit.plugin.java.JavaPlugin
-
saveConfig
public void saveConfig()設定ファイルを保存するメソッド現在のメモリ上の設定内容をファイルに保存します。 保存に失敗した場合はエラーログを出力します。
- Specified by:
saveConfigin interfaceorg.bukkit.plugin.Plugin- Overrides:
saveConfigin classorg.bukkit.plugin.java.JavaPlugin
-
getLanguageManager
言語マネージャーを取得するメソッド- Returns:
- 言語マネージャーのインスタンス
-
getPlugin
public static org.bukkit.plugin.Plugin getPlugin()プラグインのインスタンスを取得するためのユーティリティメソッド- Returns:
- プラグインのインスタンス
-