Package com.ultikits.ultitools.manager
Class UpdateManager
java.lang.Object
com.ultikits.ultitools.manager.UpdateManager
Manages version checking and update notifications for UltiTools-API and modules.
Checks once at startup, stores results for later querying by commands and listeners.
管理UltiTools-API和模块的版本检查和更新通知。 在启动时检查一次,存储结果供命令和监听器查询。
管理UltiTools-API和模块的版本检查和更新通知。 在启动时检查一次,存储结果供命令和监听器查询。
- Since:
- 6.2.0
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate booleanprivate UpdateInfoprivate final Loggerprivate final Map<String, UpdateInfo> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate voidprivate voidvoidRun update checks synchronously.booleanCheck if any updates (framework or modules) are available.booleanisPlayerNotified(UUID uuid) Check if a player has already been notified about available updates.private voidvoidmarkPlayerNotified(UUID uuid) Mark a player as having been notified about available updates.
-
Field Details
-
logger
-
frameworkUpdate
-
moduleUpdates
-
notifiedPlayers
-
checkComplete
private volatile boolean checkComplete
-
-
Constructor Details
-
UpdateManager
-
-
Method Details
-
checkUpdatesSync
public void checkUpdatesSync()Run update checks synchronously. Called from async context (BukkitRunnable).
同步运行更新检查。从异步上下文(BukkitRunnable)调用。 -
checkFrameworkUpdate
private void checkFrameworkUpdate() -
checkModuleUpdates
private void checkModuleUpdates() -
logResults
private void logResults() -
hasAnyUpdates
public boolean hasAnyUpdates()Check if any updates (framework or modules) are available.
检查是否有任何更新(框架或模块)可用。- Returns:
- true if any updates are available
如果有任何更新可用则返回true
-
isPlayerNotified
Check if a player has already been notified about available updates.
检查玩家是否已被通知有可用更新。- Parameters:
uuid- the player's UUID
玩家的UUID- Returns:
- true if the player has been notified
如果玩家已被通知则返回true
-
markPlayerNotified
Mark a player as having been notified about available updates.
标记玩家已被通知有可用更新。- Parameters:
uuid- the player's UUID
玩家的UUID
-