Skip to content

Commit

Permalink
1.5.6.5 (fixed some reload issues)
Browse files Browse the repository at this point in the history
  • Loading branch information
boiscljo committed Apr 16, 2022
1 parent 378d222 commit 8e3ab00
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
SBA_VERSION=1.5.6.4
SBA_VERSION=1.5.6.5

PAPER_LEGACY_VERSION=1.16.5
JUPITER_VERSION=5.7.2
Expand Down
14 changes: 6 additions & 8 deletions plugin/src/main/java/io/github/pronze/sba/utils/SBAUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -100,26 +100,24 @@ public static void disablePlugin(@NotNull JavaPlugin plugin) {
+ plugin.getDescription().getFullName() + " (Is it up to date?)", ex);
}

try {
/*try {
// Bukkit.getServicesManager().unregisterAll(plugin);
} catch (Throwable ex) {
Bukkit.getLogger().log(Level.SEVERE,
"Error occurred (in the plugin loader) while unregistering services for "
+ plugin.getDescription().getFullName() + " (Is it up to date?)",
ex);
}
}*/

try {
var handlers = HandlerList.getRegisteredListeners(plugin);
Logger.trace("-----------------------{}-----------------", handlers.size());
for (var handler : handlers) {
//if (handler.getListener().toString().contains("io.github.pronze.sba") ||
// handler.getListener().toString().contains("io.github.pronze.lib.screaming") ||
// handler.getListener().toString().contains("io.github.pronze.lib.simpleinventories") ||
// handler.getListener().toString().contains("org.screamingsandals.bedwars.lib.sgui") ||
// handler.getListener().toString().contains("io.github.pronze.lib.bedwars")) {
String id = handler.getListener().toString();
if (!id.contains("BukkitAudiencesImpl") && !id.contains("CloudBukkitListener")
&& !id.contains("CommodoreImpl$ServerReloadListener")) {
HandlerList.unregisterAll(handler.getListener());
//}
}
Logger.trace("handler {}", handler.getListener().toString());
}
Logger.trace("-----------------------{}-----------------", handlers.size());
Expand Down

0 comments on commit 8e3ab00

Please sign in to comment.