Java 16 optimisations

This commit is contained in:
WiIIiam278 committed 2021-06-16 20:53:33 +01:00
1 parent 46dd32d5c2
commit e1113efeac
23 files changed
+116 -173

No files matched your search

@@ -21,8 +21,6 @@ import static org.bukkit.configuration.file.YamlConfiguration.loadConfiguration;
public class MessageManager {
private static final int languageFileVersion = 1;
private static final Map<String, String> messages = new HashMap<>();
private static final HuskHomes plugin = HuskHomes.getInstance();
@@ -57,14 +55,15 @@ public class MessageManager {
}
FileConfiguration config = loadConfiguration(f);
config.options().header(
" ------------------------------ \n" +
"| HuskHomes Messages |\n" +
"| Developed by William278 |\n" +
" ------------------------------ \n" +
"If you'd like to use a different language, you can change it in the config.yml \n" +
"Change the appearance/text of messages in the plugin using this config. \n" +
"This config makes use of MineDown formatting, with extensive support for custom colors & formats. \n" +
"For formatting help, see: https://github.com/Phoenix616/MineDown or check the HuskHomes Wiki.");
"""
------------------------------\s
| HuskHomes Messages |
| Developed by William278 |
------------------------------\s
If you'd like to use a different language, you can change it in the config.yml\s
Change the appearance/text of messages in the plugin using this config.\s
This config makes use of MineDown formatting, with extensive support for custom colors & formats.\s
For formatting help, see: https://github.com/Phoenix616/MineDown or check the HuskHomes Wiki.""");
InputStream defaultMessageFile = plugin.getResource("Languages/" + language + ".yml");
if (defaultMessageFile != null) {
YamlConfiguration yamlConfiguration = YamlConfiguration.loadConfiguration(new InputStreamReader(defaultMessageFile, StandardCharsets.UTF_8));