Moved all language settings to language.yml
Moved two config options for ingame messages from config.yml to languages.yml for consistency
This commit is contained in:
parent
41c033132d
commit
df3f5b3041
@ -5,7 +5,6 @@ import java.io.IOException;
|
|||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import org.bukkit.ChatColor;
|
|
||||||
import org.bukkit.configuration.file.YamlConfiguration;
|
import org.bukkit.configuration.file.YamlConfiguration;
|
||||||
|
|
||||||
public class ConfigurationManager
|
public class ConfigurationManager
|
||||||
@ -53,18 +52,7 @@ public class ConfigurationManager
|
|||||||
|
|
||||||
changedConfig = true;
|
changedConfig = true;
|
||||||
}
|
}
|
||||||
if (!this.config.isString("message-equip"))
|
|
||||||
{
|
|
||||||
this.config.set("message-equip", ChatColor.AQUA + "[Jetpacks] " + ChatColor.GRAY + "%name%" + ChatColor.GREEN + " is now equipped." + ChatColor.YELLOW + " [Double jump to use]");
|
|
||||||
|
|
||||||
changedConfig = true;
|
|
||||||
}
|
|
||||||
if (!this.config.isString("message-unequip"))
|
|
||||||
{
|
|
||||||
this.config.set("message-unequip", ChatColor.AQUA + "[Jetpacks] " + ChatColor.GRAY + "%name%" + ChatColor.RED + " is no longer equipped!");
|
|
||||||
|
|
||||||
changedConfig = true;
|
|
||||||
}
|
|
||||||
if (!this.config.isConfigurationSection("jetpacks"))
|
if (!this.config.isConfigurationSection("jetpacks"))
|
||||||
{
|
{
|
||||||
this.config.set("jetpacks.example.displayName", "Example Jetpack");
|
this.config.set("jetpacks.example.displayName", "Example Jetpack");
|
||||||
|
@ -150,7 +150,7 @@ public class JetpackManager
|
|||||||
}
|
}
|
||||||
|
|
||||||
String name = (profile == null || profile.getName() == null ? "unknown" : profile.getName());
|
String name = (profile == null || profile.getName() == null ? "unknown" : profile.getName());
|
||||||
p.sendMessage(AIOPlugin.getInstance().getConfigManager().getConfiguration().getString("message-unequip", "").replace("%name%", "#" + name));
|
p.sendMessage(AIOPlugin.getInstance().getLocalizationManager().getConfiguration().getString("message-unequip", "").replace("%name%", "#" + name));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -190,7 +190,7 @@ public class JetpackManager
|
|||||||
}
|
}
|
||||||
|
|
||||||
String name = (i.getProfile() == null || i.getProfile().getName() == null ? "unknown" : i.getProfile().getName());
|
String name = (i.getProfile() == null || i.getProfile().getName() == null ? "unknown" : i.getProfile().getName());
|
||||||
p.sendMessage(AIOPlugin.getInstance().getConfigManager().getConfiguration().getString("message-equip", "").replace("%name%", "#" + name));
|
p.sendMessage(AIOPlugin.getInstance().getLocalizationManager().getConfiguration().getString("message-equip", "").replace("%name%", "#" + name));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -131,6 +131,18 @@ public class LocalizationManager
|
|||||||
this.languageConfig.set("message-general-nopermissions", ChatColor.RED + "You don't have permission to use this command!");
|
this.languageConfig.set("message-general-nopermissions", ChatColor.RED + "You don't have permission to use this command!");
|
||||||
changedConfig = true;
|
changedConfig = true;
|
||||||
}
|
}
|
||||||
|
if (!this.languageConfig.isString("message-equip"))
|
||||||
|
{
|
||||||
|
this.languageConfig.set("message-equip", ChatColor.AQUA + "[Jetpacks] " + ChatColor.GRAY + "%name%" + ChatColor.GREEN + " is now equipped." + ChatColor.YELLOW + " [Double jump to use]");
|
||||||
|
|
||||||
|
changedConfig = true;
|
||||||
|
}
|
||||||
|
if (!this.languageConfig.isString("message-unequip"))
|
||||||
|
{
|
||||||
|
this.languageConfig.set("message-unequip", ChatColor.AQUA + "[Jetpacks] " + ChatColor.GRAY + "%name%" + ChatColor.RED + " is no longer equipped!");
|
||||||
|
|
||||||
|
changedConfig = true;
|
||||||
|
}
|
||||||
|
|
||||||
if (changedConfig)
|
if (changedConfig)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user