Search in sources :

Example 36 with LanguageManager

use of com.github.sirblobman.api.language.LanguageManager in project CombatLogX by SirBlobman.

the class BossBarUpdater method getMessage.

private String getMessage(Player player, long timeLeftMillis) {
    LanguageManager languageManager = getLanguageManager();
    if (timeLeftMillis <= 0) {
        String path = ("expansion.boss-bar.ended");
        return languageManager.getMessage(player, path, null, true);
    }
    String path = ("expansion.boss-bar.timer");
    String message = languageManager.getMessage(player, path, null, true);
    if (message.isEmpty()) {
        return null;
    }
    return replacePlaceholders(player, message);
}
Also used : LanguageManager(com.github.sirblobman.api.language.LanguageManager)

Aggregations

LanguageManager (com.github.sirblobman.api.language.LanguageManager)36 ICombatLogX (com.github.sirblobman.combatlogx.api.ICombatLogX)12 Player (org.bukkit.entity.Player)12 ConfigurationManager (com.github.sirblobman.api.configuration.ConfigurationManager)9 YamlConfiguration (org.bukkit.configuration.file.YamlConfiguration)9 ICombatManager (com.github.sirblobman.combatlogx.api.manager.ICombatManager)7 Replacer (com.github.sirblobman.api.language.Replacer)6 NewbieHelperExpansion (combatlogx.expansion.newbie.helper.NewbieHelperExpansion)6 PVPManager (combatlogx.expansion.newbie.helper.manager.PVPManager)6 Collections (java.util.Collections)6 List (java.util.List)6 CommandSender (org.bukkit.command.CommandSender)6 Set (java.util.Set)5 MultiVersionHandler (com.github.sirblobman.api.nms.MultiVersionHandler)4 ProtectionManager (combatlogx.expansion.newbie.helper.manager.ProtectionManager)4 DecimalFormat (java.text.DecimalFormat)4 ArrayList (java.util.ArrayList)4 Arrays (java.util.Arrays)4 Locale (java.util.Locale)4 UUID (java.util.UUID)4