port: compat layer
- add compat/Adventure (BukkitAudiences lifecycle with legacy fallback) - add compat/Msg (send/broadcast/actionBar/title/legacy/plain/displayName/playerListName/kick/itemMeta/inventoryTitle) - wire Adventure.init/close in LoChat onEnable/onDisable - remove unused reflection-based utils/platform/AdventureManager
This commit is contained in:
parent
dd725ad255
commit
88e4e68cca
4 changed files with 227 additions and 96 deletions
|
|
@ -47,7 +47,8 @@ public final class LoChat extends JavaPlugin {
|
|||
@Override
|
||||
public void onEnable() {
|
||||
instance = this;
|
||||
getLogger().info("Загрузка LoChat v" + getPluginMeta().getVersion() + " для Paper/Folia " + Bukkit.getMinecraftVersion() + "...");
|
||||
com.loki.lochat.compat.Adventure.init(this);
|
||||
getLogger().info("Загрузка LoChat v" + getDescription().getVersion() + " для Spigot " + Bukkit.getBukkitVersion() + "...");
|
||||
|
||||
// Инициализация
|
||||
initializer = new PluginInitializer(this);
|
||||
|
|
@ -95,6 +96,7 @@ public final class LoChat extends JavaPlugin {
|
|||
@Override
|
||||
public void onDisable() {
|
||||
shutdown.shutdown(serviceRegistry, autoMessageManager, discordIntegration, gradientModule);
|
||||
com.loki.lochat.compat.Adventure.close();
|
||||
}
|
||||
|
||||
public void reload() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue