mirror of
https://github.com/TuxCoding/FastLogin.git
synced 2025-07-29 18:27:36 +02:00
Fixed default message copying
This commit is contained in:
@ -49,11 +49,18 @@ public class BukkitCore extends FastLoginCore {
|
||||
|
||||
InputStreamReader defaultReader = new InputStreamReader(plugin.getResource("messages.yml"), Charsets.UTF_8);
|
||||
YamlConfiguration defaults = YamlConfiguration.loadConfiguration(defaultReader);
|
||||
messageConfig.setDefaults(defaults);
|
||||
for (String key : defaults.getKeys(false)) {
|
||||
String message = ChatColor.translateAlternateColorCodes('&', defaults.getString(key));
|
||||
if (!message.isEmpty()) {
|
||||
localeMessages.put(key, message);
|
||||
}
|
||||
}
|
||||
|
||||
for (String key : messageConfig.getKeys(false)) {
|
||||
String message = ChatColor.translateAlternateColorCodes('&', messageConfig.getString(key));
|
||||
if (!message.isEmpty()) {
|
||||
if (message.isEmpty()) {
|
||||
localeMessages.remove(key);
|
||||
} else {
|
||||
localeMessages.put(key, message);
|
||||
}
|
||||
}
|
||||
|
@ -44,7 +44,7 @@ public class PremiumCommand implements CommandExecutor {
|
||||
} else {
|
||||
UUID id = ((Player) sender).getUniqueId();
|
||||
if (plugin.getConfig().getBoolean("premium-warning") && !plugin.getPendingConfirms().contains(id)) {
|
||||
sender.sendMessage(plugin.getCore().getMessage("premium-warming"));
|
||||
sender.sendMessage(plugin.getCore().getMessage("premium-warning"));
|
||||
plugin.getPendingConfirms().add(id);
|
||||
return true;
|
||||
}
|
||||
|
@ -84,7 +84,7 @@ invalid-requst: '&4Invalid request'
|
||||
not-started: '&cServer is not fully started yet. Please retry'
|
||||
|
||||
# Warning message if a user invoked /premium command
|
||||
premium-warming: '&6WARNING: This command should only be invoked if you are the owner of this paid minecraft account
|
||||
premium-warning: '&6WARNING: This command should only be invoked if you are the owner of this paid minecraft account
|
||||
Type /premium again to confirm'
|
||||
|
||||
# ========= Bungee/Waterfall only ================================
|
||||
|
Reference in New Issue
Block a user