mirror of
https://github.com/TuxCoding/FastLogin.git
synced 2025-07-29 18:27:36 +02:00
Unregister variable on disable
This commit is contained in:
@ -103,6 +103,9 @@ public class FastLoginBukkit extends JavaPlugin implements PlatformPlugin<Comman
|
||||
}
|
||||
|
||||
bungeeManager.cleanup();
|
||||
if (getServer().getPluginManager().isPluginEnabled("PlaceholderAPI")) {
|
||||
PremiumPlaceholder.unregisterAll(this);
|
||||
}
|
||||
}
|
||||
|
||||
public FastLoginCore<Player, CommandSender, FastLoginBukkit> getCore() {
|
||||
|
@ -1,5 +1,6 @@
|
||||
package com.github.games647.fastlogin.bukkit;
|
||||
|
||||
import me.clip.placeholderapi.PlaceholderAPI;
|
||||
import me.clip.placeholderapi.expansion.PlaceholderExpansion;
|
||||
|
||||
import org.bukkit.entity.Player;
|
||||
@ -14,6 +15,10 @@ public class PremiumPlaceholder extends PlaceholderExpansion {
|
||||
this.plugin = plugin;
|
||||
}
|
||||
|
||||
public static void unregisterAll(FastLoginBukkit plugin) {
|
||||
PlaceholderAPI.unregisterPlaceholderHook(plugin.getName());
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onPlaceholderRequest(Player player, String identifier) {
|
||||
// player is null if offline
|
||||
|
Reference in New Issue
Block a user