From 4256909eee82fca4c0675edda01723dacf2e3a63 Mon Sep 17 00:00:00 2001 From: Josh Roy <10731363+JRoy@users.noreply.github.com> Date: Wed, 26 Apr 2023 21:28:33 -0400 Subject: [PATCH] Fix folia init tasks never getting called LOLW --- .../src/main/java/com/earth2me/essentials/Essentials.java | 6 +----- .../com/earth2me/essentials/commands/Commandessentials.java | 1 + Essentials/src/main/resources/messages.properties | 1 + 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/Essentials/src/main/java/com/earth2me/essentials/Essentials.java b/Essentials/src/main/java/com/earth2me/essentials/Essentials.java index a3477c6fc..319245334 100644 --- a/Essentials/src/main/java/com/earth2me/essentials/Essentials.java +++ b/Essentials/src/main/java/com/earth2me/essentials/Essentials.java @@ -467,6 +467,7 @@ public class Essentials extends JavaPlugin implements net.ess3.api.IEssentials { } execTimer.mark("Init(Providers)"); + registerListeners(getServer().getPluginManager()); reload(); // The item spawn blacklist is loaded with all other settings, before the item @@ -526,8 +527,6 @@ public class Essentials extends JavaPlugin implements net.ess3.api.IEssentials { } private void registerListeners(final PluginManager pm) { - HandlerList.unregisterAll(this); - if (getSettings().isDebug()) { LOGGER.log(Level.INFO, "Registering Listeners"); } @@ -629,9 +628,6 @@ public class Essentials extends JavaPlugin implements net.ess3.api.IEssentials { command.setUsage(tl(commandName + "CommandUsage")); } } - - final PluginManager pm = getServer().getPluginManager(); - registerListeners(pm); } private IEssentialsCommand loadCommand(final String path, final String name, final IEssentialsModule module, final ClassLoader classLoader) throws Exception { diff --git a/Essentials/src/main/java/com/earth2me/essentials/commands/Commandessentials.java b/Essentials/src/main/java/com/earth2me/essentials/commands/Commandessentials.java index 6fa2873af..3b108b204 100644 --- a/Essentials/src/main/java/com/earth2me/essentials/commands/Commandessentials.java +++ b/Essentials/src/main/java/com/earth2me/essentials/commands/Commandessentials.java @@ -728,6 +728,7 @@ public class Commandessentials extends EssentialsCommand { sender.sendMessage(tl(serverMessageKey, "Server", server.getBukkitVersion() + " " + server.getVersion())); sender.sendMessage(tl(serverMessageKey, "Brand", server.getName())); + sender.sendMessage(tl("versionOutputFlags", "FOLIA:" + VersionUtil.FOLIA + ",FLAT:" + VersionUtil.PRE_FLATTENING + ",SUPSTAT:" + VersionUtil.getServerSupportStatus().name())); sender.sendMessage(tl("versionOutputFine", "EssentialsX", essVer)); for (final Plugin plugin : pm.getPlugins()) { diff --git a/Essentials/src/main/resources/messages.properties b/Essentials/src/main/resources/messages.properties index 46567df00..526f839f4 100644 --- a/Essentials/src/main/resources/messages.properties +++ b/Essentials/src/main/resources/messages.properties @@ -1483,6 +1483,7 @@ versionErrorPlayer=\u00a76Error while checking EssentialsX version information! versionFetching=\u00a76Fetching version information... versionOutputVaultMissing=\u00a74Vault is not installed. Chat and permissions may not work. versionOutputFine=\u00a76{0} version: \u00a7a{1} +versionOutputFlags=\u00a76Feature Flags: \u00a7a{0} versionOutputWarn=\u00a76{0} version: \u00a7c{1} versionOutputUnsupported=\u00a7d{0} \u00a76version: \u00a7d{1} versionOutputUnsupportedPlugins=\u00a76You are running \u00a7dunsupported plugins\u00a76!