public class PluginMetaProvider extends Object
| Constructor and Description |
|---|
PluginMetaProvider(@NotNull org.bukkit.plugin.Plugin plugin,
@NotNull Path databasePath) |
| Modifier and Type | Method and Description |
|---|---|
void |
buildDependencyTree(@NotNull org.bukkit.plugin.Plugin plugin)
依存関係ツリーを構築します。
|
void |
buildDependencyTree(@NotNull String pluginName)
依存関係ツリーを構築します。
|
void |
close()
このクラスを破棄します。
|
int |
countPlugins()
現在管理されているプラグインの数を取得します。
|
void |
deleteFromDependencyTree(@NotNull String pluginName)
依存関係ツリーを間引きします。
|
List<String> |
getAuthors(@NotNull String pluginName)
プラグインの作者を取得します。
|
List<DependencyNode> |
getDependedBy(@NotNull String pluginName)
プラグインが依存(depend)されているプラグインのリストを取得します。
|
List<DependencyNode> |
getDependOn(@NotNull String pluginName)
プラグインが依存(depend)しているプラグインのリストを取得します。
|
InstallOperator |
getInstalledBy(@NotNull String pluginName)
プラグインが誰によってインストールされたかを取得します。
|
List<DependencyNode> |
getLoadBefore(@NotNull String pluginName)
プラグインを依存(load_before)しているプラグインのリストを取得します。
load_before は特殊な依存で, 依存しているプラグインを先に読み込むようにします。
|
List<DependencyNode> |
getLoadBeforeBy(@NotNull String pluginName)
プラグインが依存(load_before)されているプラグインのリストを取得します。
load_before は特殊な依存で, 依存しているプラグインを先に読み込むようにします。
|
@NotNull PluginMeta |
getPluginMeta(@NotNull String pluginName)
プラグインのメタデータを取得します。
|
@NotNull PluginMeta |
getPluginMeta(@NotNull String pluginName,
boolean includeDependencies,
boolean includeAuthors)
プラグインのメタデータを取得します。
|
@NotNull PluginMetaIterator |
getPluginMetaIterator()
PluginMeta のイテレータを取得します。
|
List<String> |
getPluginsByAuthor(@NotNull String author)
プラグインの作者からプラグインのリストを取得します。
|
List<DependencyNode> |
getSoftDependedBy(@NotNull String pluginName)
プラグインが依存(soft_depend)されているプラグインのリストを取得します。
|
List<DependencyNode> |
getSoftDependOn(@NotNull String pluginName)
プラグインが依存(soft_depend)しているプラグインのリストを取得します。
|
List<String> |
getUnusedPlugins()
使われていない依存関係のリストを取得します。
|
boolean |
isDependency(@NotNull String pluginName)
プラグインが依存関係かどうかを取得します。
依存関係としてマークされている場合, 自動削除等の機能の対象になります。
|
boolean |
isPluginMetaExists(@NotNull String pluginName)
プラグインのメタデータが存在しているかどうかを返します。
|
void |
removePluginMeta(@NotNull String pluginName)
プラグインのメタデータを削除します。
|
void |
saveDependencyTree(@NotNull List<DependencyNode> dependencyNodes)
依存関係ツリーを保存します。
|
void |
savePluginMeta(@NotNull org.bukkit.plugin.Plugin plugin,
@NotNull InstallOperator installedBy,
long installedAt,
@Nullable String resolveQuery,
boolean isDependency)
プラグインのメタデータを保存します。
|
void |
savePluginMeta(@NotNull PluginMeta meta) |
void |
setDependencyFlag(@NotNull String pluginName,
boolean isDependency)
プラグインが依存関係かどうかを設定します。
|
void |
updateResolveQuery(@NotNull String pluginName,
@NotNull String query)
プラグインの解決クエリを更新します。
|
public PluginMetaProvider(@NotNull
@NotNull org.bukkit.plugin.Plugin plugin,
@NotNull
@NotNull Path databasePath)
public void close()
public List<DependencyNode> getDependOn(@NotNull @NotNull String pluginName)
pluginName - プラグインの名前public List<DependencyNode> getSoftDependOn(@NotNull @NotNull String pluginName)
pluginName - プラグインの名前public List<DependencyNode> getLoadBefore(@NotNull @NotNull String pluginName)
pluginName - プラグインの名前public List<DependencyNode> getDependedBy(@NotNull @NotNull String pluginName)
pluginName - プラグインの名前public List<DependencyNode> getSoftDependedBy(@NotNull @NotNull String pluginName)
pluginName - プラグインの名前public List<DependencyNode> getLoadBeforeBy(@NotNull @NotNull String pluginName)
pluginName - プラグインの名前public List<String> getAuthors(@NotNull @NotNull String pluginName)
pluginName - プラグインの名前public List<String> getPluginsByAuthor(@NotNull @NotNull String author)
author - プラグインの作者public InstallOperator getInstalledBy(@NotNull @NotNull String pluginName)
pluginName - プラグインの名前public boolean isDependency(@NotNull
@NotNull String pluginName)
pluginName - プラグインの名前public void setDependencyFlag(@NotNull
@NotNull String pluginName,
boolean isDependency)
pluginName - プラグインの名前isDependency - 依存関係かどうかpublic void updateResolveQuery(@NotNull
@NotNull String pluginName,
@NotNull
@NotNull String query)
pluginName - プラグインの名前query - 解決クエリpublic boolean isPluginMetaExists(@NotNull
@NotNull String pluginName)
pluginName - プラグインの名前public void savePluginMeta(@NotNull
@NotNull org.bukkit.plugin.Plugin plugin,
@NotNull
@NotNull InstallOperator installedBy,
long installedAt,
@Nullable
@Nullable String resolveQuery,
boolean isDependency)
plugin - プラグインinstalledBy - プラグインのインストール者installedAt - プラグインのインストール日時resolveQuery - プラグインの解決クエリisDependency - プラグインが依存関係かどうかpublic void savePluginMeta(@NotNull
@NotNull PluginMeta meta)
public void removePluginMeta(@NotNull
@NotNull String pluginName)
pluginName - プラグインの名前@NotNull public @NotNull PluginMeta getPluginMeta(@NotNull @NotNull String pluginName, boolean includeDependencies, boolean includeAuthors)
pluginName - プラグインの名前includeDependencies - 依存関係を含めるかどうか@NotNull public @NotNull PluginMeta getPluginMeta(@NotNull @NotNull String pluginName)
pluginName - プラグインの名前public void saveDependencyTree(@NotNull
@NotNull List<DependencyNode> dependencyNodes)
dependencyNodes - 依存関係ツリーpublic void buildDependencyTree(@NotNull
@NotNull org.bukkit.plugin.Plugin plugin)
plugin - プラグインpublic void buildDependencyTree(@NotNull
@NotNull String pluginName)
pluginName - プラグインpublic void deleteFromDependencyTree(@NotNull
@NotNull String pluginName)
pluginName - プラグインの名前@NotNull public @NotNull PluginMetaIterator getPluginMetaIterator()
public int countPlugins()
public List<String> getUnusedPlugins()
(プラグインが依存関係であるかどうかは、plugin_meta.is_dependencyを使用して確認できます) 関係はdependency_treeテーブルに格納されています。
例:サーバにインストールされているプラグイン: PluginAは依存関係 PluginBは依存関係 PluginCは依存関係ではない
例1:
例2:
Copyright © 2023. All rights reserved.