mirror of
https://github.com/PlaceholderAPI/PlaceholderAPI
synced 2026-02-07 00:27:12 +01:00
updated LocalExpansionManager to accept a command sender to notify of load completion details
This commit is contained in:
@@ -28,7 +28,6 @@ import me.clip.placeholderapi.expansion.manager.CloudExpansionManager;
|
||||
import me.clip.placeholderapi.expansion.manager.LocalExpansionManager;
|
||||
import me.clip.placeholderapi.listeners.ServerLoadEventListener;
|
||||
import me.clip.placeholderapi.updatechecker.UpdateChecker;
|
||||
import me.clip.placeholderapi.util.Msg;
|
||||
import org.bstats.bukkit.Metrics;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.command.CommandSender;
|
||||
@@ -128,7 +127,7 @@ public final class PlaceholderAPIPlugin extends JavaPlugin
|
||||
|
||||
reloadConfig();
|
||||
|
||||
getLocalExpansionManager().load();
|
||||
getLocalExpansionManager().load(sender);
|
||||
|
||||
if (config.isCloudEnabled())
|
||||
{
|
||||
@@ -138,9 +137,6 @@ public final class PlaceholderAPIPlugin extends JavaPlugin
|
||||
{
|
||||
getCloudExpansionManager().kill();
|
||||
}
|
||||
|
||||
Msg.msg(sender,
|
||||
getLocalExpansionManager().getIdentifiers().size() + " &aplaceholder hooks successfully registered!");
|
||||
}
|
||||
|
||||
|
||||
@@ -232,7 +228,7 @@ public final class PlaceholderAPIPlugin extends JavaPlugin
|
||||
}
|
||||
catch (final ExceptionInInitializerError | ClassNotFoundException ignored)
|
||||
{
|
||||
Bukkit.getScheduler().runTaskLater(this, getLocalExpansionManager()::load, 1);
|
||||
Bukkit.getScheduler().runTaskLater(this, () -> getLocalExpansionManager().load(Bukkit.getConsoleSender()), 1);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user