Search in sources :

Example 1 with AbstractTablist

use of net.dzikoysk.funnyguilds.element.tablist.AbstractTablist in project FunnyGuilds by FunnyGuilds.

the class AsynchronouslyRepeater method run.

@Override
public void run() {
    ++banSystem;
    ++validitySystem;
    if (validitySystem >= 10) {
        validitySystem();
    }
    if (banSystem >= 7) {
        banSystem();
    }
    PluginConfig config = Settings.getConfig();
    if (!config.playerlistEnable) {
        return;
    }
    for (Player player : Bukkit.getOnlinePlayers()) {
        if (!AbstractTablist.hasTablist(player)) {
            AbstractTablist.createTablist(config.playerList, config.playerListHeader, config.playerListFooter, config.playerListPing, player);
        }
        AbstractTablist tablist = AbstractTablist.getTablist(player);
        tablist.send();
    }
}
Also used : PluginConfig(net.dzikoysk.funnyguilds.data.configs.PluginConfig) Player(org.bukkit.entity.Player) AbstractTablist(net.dzikoysk.funnyguilds.element.tablist.AbstractTablist)

Aggregations

PluginConfig (net.dzikoysk.funnyguilds.data.configs.PluginConfig)1 AbstractTablist (net.dzikoysk.funnyguilds.element.tablist.AbstractTablist)1 Player (org.bukkit.entity.Player)1