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