use of net.dzikoysk.funnyguilds.data.Settings in project FunnyGuilds by FunnyGuilds.
the class ExcFunnyGuilds method reload.
private void reload(CommandSender sender) {
if (!sender.hasPermission("funnyguilds.reload")) {
sender.sendMessage(Messages.getInstance().permission);
return;
}
Thread thread = new Thread(() -> {
Manager dm = Manager.getInstance();
dm.stop();
dm.save();
new Messages();
new Settings();
dm.start();
if (Settings.getConfig().playerlistEnable) {
PluginConfig config = Settings.getConfig();
AbstractTablist.wipeCache();
for (Player player : Bukkit.getOnlinePlayers()) {
AbstractTablist.createTablist(config.playerList, config.playerListHeader, config.playerListFooter, config.playerListPing, player);
}
}
sender.sendMessage(ChatColor.AQUA + "FunnyGuilds " + ChatColor.GRAY + "przeladowano!");
});
sender.sendMessage(ChatColor.GRAY + "Przeladowywanie...");
thread.start();
}
Aggregations