small fix
This commit is contained in:
parent
56080e1eb8
commit
90df1fa5fb
@ -23,7 +23,7 @@ public class T2C_ConfigWriter {
|
|||||||
public static void createConfig(String prefix, File configFile, T2C_ConfigItem[] values, boolean isReload, String... header) {
|
public static void createConfig(String prefix, File configFile, T2C_ConfigItem[] values, boolean isReload, String... header) {
|
||||||
boolean exist = configFile.exists();
|
boolean exist = configFile.exists();
|
||||||
if (!exist) {
|
if (!exist) {
|
||||||
configFile.getParentFile().mkdirs();
|
configFile.getParentFile().mkdir();
|
||||||
try {
|
try {
|
||||||
configFile.createNewFile();
|
configFile.createNewFile();
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
|
@ -8,7 +8,7 @@ import java.io.File;
|
|||||||
|
|
||||||
public class ConvertT2ClibConfig {
|
public class ConvertT2ClibConfig {
|
||||||
|
|
||||||
public static YamlConfiguration yamlConfiguration;
|
private static YamlConfiguration yamlConfiguration;
|
||||||
|
|
||||||
|
|
||||||
public static void convert() {
|
public static void convert() {
|
||||||
@ -31,7 +31,6 @@ public class ConvertT2ClibConfig {
|
|||||||
set("Player.Inventories.CloseByServerStop", T2C_LibConfig.VALUES.inventoriesCloseByServerStop);
|
set("Player.Inventories.CloseByServerStop", T2C_LibConfig.VALUES.inventoriesCloseByServerStop);
|
||||||
set("Command.PermToggle.PermissionSetCommand", T2C_LibConfig.VALUES.updateCheckOnJoin);
|
set("Command.PermToggle.PermissionSetCommand", T2C_LibConfig.VALUES.updateCheckOnJoin);
|
||||||
|
|
||||||
config.delete();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void set(String path, T2C_ConfigItem item){
|
private static void set(String path, T2C_ConfigItem item){
|
||||||
|
@ -13,93 +13,79 @@ public class T2C_LibConfig {
|
|||||||
|
|
||||||
public enum VALUES implements T2C_ConfigItem {
|
public enum VALUES implements T2C_ConfigItem {
|
||||||
|
|
||||||
updateCheckOnJoin("plugin.updateCheck.onJoin", true, true,
|
updateCheckOnJoin("plugin.updateCheck.onJoin", true, true, new HashMap<>() {{
|
||||||
new HashMap<>() {{
|
put(T2C_LanguageEnum.german, List.of("Mit dieser Option kannst du festlegen, ob Spieler mit der Berechtigung 't2code.lib.updatemsg' beim Join eine Update-Nachricht erhalten, wenn ein Update für das Plugin verfügbar ist."));
|
||||||
put(T2C_LanguageEnum.german, List.of("Mit dieser Option kannst du festlegen, ob Spieler mit der Berechtigung 't2code.lib.updatemsg' beim Join eine Update-Nachricht erhalten, wenn ein Update für das Plugin verfügbar ist."));
|
put(T2C_LanguageEnum.english, List.of("In this option you can set if players with the permission 't2code.lib.updatemsg' will get an update message on join when an update for the plugin is available."));
|
||||||
put(T2C_LanguageEnum.english, List.of("In this option you can set if players with the permission 't2code.lib.updatemsg' will get an update message on join when an update for the plugin is available."));
|
}}),
|
||||||
}}),
|
|
||||||
|
|
||||||
updateCheckTimeInterval("plugin.updateCheck.timeInterval", 60, true,
|
updateCheckTimeInterval("plugin.updateCheck.timeInterval", 60, true, new HashMap<>() {{
|
||||||
new HashMap<>() {{
|
put(T2C_LanguageEnum.german, List.of("Mit dieser Option kannst du das Zeitintervall in Minuten festlegen, in dem Aktualisierungen überprüft werden sollen."));
|
||||||
put(T2C_LanguageEnum.german, List.of("Mit dieser Option kannst du das Zeitintervall in Minuten festlegen, in dem Aktualisierungen überprüft werden sollen."));
|
put(T2C_LanguageEnum.english, List.of("In this option you can set the time interval in minutes in which updates should be checked."));
|
||||||
put(T2C_LanguageEnum.english, List.of("In this option you can set the time interval in minutes in which updates should be checked."));
|
}}),
|
||||||
}}),
|
|
||||||
|
|
||||||
seePreReleaseUpdates("plugin.updateCheck.seePreReleaseUpdates", true, true,
|
seePreReleaseUpdates("plugin.updateCheck.seePreReleaseUpdates", true, true, new HashMap<>() {{
|
||||||
new HashMap<>() {{
|
put(T2C_LanguageEnum.german, List.of("In dieser Option kannst du einstellen, ob du Beta- und Snapshot-Versionen in der Update-Prüfung erhalten und anzeigen möchten."));
|
||||||
put(T2C_LanguageEnum.german, List.of("In dieser Option kannst du einstellen, ob du Beta- und Snapshot-Versionen in der Update-Prüfung erhalten und anzeigen möchten."));
|
put(T2C_LanguageEnum.english, List.of("In this option you can set whether you want to receive and display beta and snapshot versions in the update check."));
|
||||||
put(T2C_LanguageEnum.english, List.of("In this option you can set whether you want to receive and display beta and snapshot versions in the update check."));
|
}}),
|
||||||
}}),
|
|
||||||
|
|
||||||
updateCheckFullDisable("plugin.updateCheck.allPlugins.fullDisable", false, true,
|
updateCheckFullDisable("plugin.updateCheck.allPlugins.fullDisable", false, true, new HashMap<>() {{
|
||||||
new HashMap<>() {{
|
put(T2C_LanguageEnum.german, List.of("Diese Option deaktiviert alle Aktualisierungsprüfungen für Plugins, die die T2CodeLib verwenden."));
|
||||||
put(T2C_LanguageEnum.german, List.of("Diese Option deaktiviert alle Aktualisierungsprüfungen für Plugins, die die T2CodeLib verwenden."));
|
put(T2C_LanguageEnum.english, List.of("This option deactivates all update checks for plugins that use the T2CodeLib."));
|
||||||
put(T2C_LanguageEnum.english, List.of("This option deactivates all update checks for plugins that use the T2CodeLib."));
|
}}),
|
||||||
}}),
|
|
||||||
|
|
||||||
debug("plugin.debug.debugModus", false, true,
|
debug("plugin.debug.debugModus", false, true, new HashMap<>() {{
|
||||||
new HashMap<>() {{
|
put(T2C_LanguageEnum.german, List.of("Der Debug-Modus sendet ausführlichere Debug-Informationen an die Konsole.", "In dieser Version des Plugins sind keine Debug-Meldungen eingebaut!"));
|
||||||
put(T2C_LanguageEnum.german, List.of("Der Debug-Modus sendet ausführlichere Debug-Informationen an die Konsole.", "In dieser Version des Plugins sind keine Debug-Meldungen eingebaut!"));
|
put(T2C_LanguageEnum.english, List.of("The debug mode sends more detailed debug information to the console.", "In this version of the plugin no debug messages are built in!"));
|
||||||
put(T2C_LanguageEnum.english, List.of("The debug mode sends more detailed debug information to the console.", "In this version of the plugin no debug messages are built in!"));
|
}}),
|
||||||
}}),
|
|
||||||
|
|
||||||
developerTool("plugin.debug.developerTool", false, true,
|
developerTool("plugin.debug.developerTool", false, true, new HashMap<>() {{
|
||||||
new HashMap<>() {{
|
put(T2C_LanguageEnum.german, List.of("Diese Option aktiviert erweiterte Werkzeuge für die Entwickler von Plugins, die die T2CodeLib verwenden.", "Wenn du nicht genau weist, wozu das gut ist, solltest du es deaktiviert lassen!"));
|
||||||
put(T2C_LanguageEnum.german, List.of("Diese Option aktiviert erweiterte Werkzeuge für die Entwickler von Plugins, die die T2CodeLib verwenden.", "Wenn du nicht genau weist, wozu das gut ist, solltest du es deaktiviert lassen!"));
|
put(T2C_LanguageEnum.english, List.of("This option activates advanced tools for the developers of plugins that use the T2CodeLib.", "If you don't know exactly what this is for, you should leave it deactivated!"));
|
||||||
put(T2C_LanguageEnum.english, List.of("This option activates advanced tools for the developers of plugins that use the T2CodeLib.", "If you don't know exactly what this is for, you should leave it deactivated!"));
|
}}),
|
||||||
}}),
|
|
||||||
|
|
||||||
language("plugin.language", "english", true,
|
language("plugin.language", T2C_LanguageEnum.english, true, new HashMap<>() {{
|
||||||
new HashMap<>() {{
|
put(T2C_LanguageEnum.german, List.of("In dieser Option kannst du die Sprache des Plugins einstellen."));
|
||||||
put(T2C_LanguageEnum.german, List.of("In dieser Option kannst du die Sprache des Plugins einstellen."));
|
put(T2C_LanguageEnum.english, List.of("In this option you can set the language of the plugin."));
|
||||||
put(T2C_LanguageEnum.english, List.of("In this option you can set the language of the plugin."));
|
}}),
|
||||||
}}),
|
|
||||||
|
|
||||||
space_proxy("proxy", null, true,
|
space_proxy("proxy", null, true, new HashMap<>() {{
|
||||||
new HashMap<>() {{
|
put(T2C_LanguageEnum.german, List.of());
|
||||||
put(T2C_LanguageEnum.german, List.of());
|
put(T2C_LanguageEnum.english, List.of("For this option, the option proxy.enable in the config.yml of the T2CodeLib must be set to true and the T2CodeLib must also be present on the proxy in order to function as a bridge."));
|
||||||
put(T2C_LanguageEnum.english, List.of("For this option, the option proxy.enable in the config.yml of the T2CodeLib must be set to true and the T2CodeLib must also be present on the proxy in order to function as a bridge."));
|
}}),
|
||||||
}}),
|
proxy("proxy.enable", T2C_Main.isProxy(), true, new HashMap<>() {{
|
||||||
proxy("proxy.enable", T2C_Main.isProxy(), true,
|
put(T2C_LanguageEnum.german, List.of("Diese Option muss aktiviert werden, wenn du die T2CodeLib auf einem BungeeCord, Waterfall oder Velocity Proxy als Bridge verwenden möchtest."
|
||||||
new HashMap<>() {{
|
, "Bitte beachte, dass die einzelnen APIs der Plugins, die eine Bridge auf einem Proxy verwenden, in der config.yml der T2CodeLib auf dem Proxy aktiviert werden müssen!"));
|
||||||
put(T2C_LanguageEnum.german, List.of("Diese Option muss aktiviert werden, wenn du die T2CodeLib auf einem BungeeCord, Waterfall oder Velocity Proxy als Bridge verwenden möchtest."
|
put(T2C_LanguageEnum.english, List.of("This option must be activated if you use the T2CodeLib on a BungeeCord, Waterfall or Velocity Proxy as a bridge."
|
||||||
, "Bitte beachte, dass die einzelnen APIs der Plugins, die eine Bridge auf einem Proxy verwenden, in der config.yml der T2CodeLib auf dem Proxy aktiviert werden müssen!"));
|
, "Please note that the individual APIs of the plugins that use a bridge on a proxy must be activated in the config.yml of the T2CodeLib on the proxy!"));
|
||||||
put(T2C_LanguageEnum.english, List.of("This option must be activated if you use the T2CodeLib on a BungeeCord, Waterfall or Velocity Proxy as a bridge."
|
}}),
|
||||||
, "Please note that the individual APIs of the plugins that use a bridge on a proxy must be activated in the config.yml of the T2CodeLib on the proxy!"));
|
|
||||||
}}),
|
|
||||||
|
|
||||||
serverUUID("proxy.serverUUID", UUID.randomUUID(), true,
|
serverUUID("proxy.serverUUID", UUID.randomUUID(), true, new HashMap<>() {{
|
||||||
new HashMap<>() {{
|
put(T2C_LanguageEnum.german, List.of("Diese UUID wird für die Kommunikation der Plugins in einem Netzwerk mit mehreren Servern verwendet.", "Diese UUID darf nur einmal in einem Netz vorkommen!"));
|
||||||
put(T2C_LanguageEnum.german, List.of("Diese UUID wird für die Kommunikation der Plugins in einem Netzwerk mit mehreren Servern verwendet.", "Diese UUID darf nur einmal in einem Netz vorkommen!"));
|
put(T2C_LanguageEnum.english, List.of("This UUID is used for the communication of the plugins in a network with several servers.", "This UUID may only occur once in a network!"));
|
||||||
put(T2C_LanguageEnum.english, List.of("This UUID is used for the communication of the plugins in a network with several servers.", "This UUID may only occur once in a network!"));
|
}}),
|
||||||
}}),
|
|
||||||
|
|
||||||
space_player("player", null, true,
|
space_player("player", null, true, new HashMap<>() {{
|
||||||
new HashMap<>() {{
|
put(T2C_LanguageEnum.german, List.of());
|
||||||
put(T2C_LanguageEnum.german, List.of());
|
put(T2C_LanguageEnum.english, List.of());
|
||||||
put(T2C_LanguageEnum.english, List.of());
|
}}),
|
||||||
}}),
|
|
||||||
|
|
||||||
inventoriesCloseByServerStop("player.inventories.closeByServerStop", true, true,
|
inventoriesCloseByServerStop("player.inventories.closeByServerStop", true, true, new HashMap<>() {{
|
||||||
new HashMap<>() {{
|
put(T2C_LanguageEnum.german, List.of("Wenn diese Option aktiviert ist, werden bei allen Spielern auf dem Server (Spigot, Papier, etc.) das Inventar / GUIs geschlossen, wenn der Server heruntergefahren oder neu gestartet wird.",
|
||||||
put(T2C_LanguageEnum.german, List.of("Wenn diese Option aktiviert ist, werden bei allen Spielern auf dem Server (Spigot, Papier, etc.) das Inventar / GUIs geschlossen, wenn der Server heruntergefahren oder neu gestartet wird.",
|
"(Damit ist nicht das gesamte Netz gemeint, wenn ein Proxy verwendet wird)"));
|
||||||
"(Damit ist nicht das gesamte Netz gemeint, wenn ein Proxy verwendet wird)"));
|
put(T2C_LanguageEnum.english, List.of("If this option is enabled, all players on the server (spigot, paper, etc.) will have their inventory / GUIs closed when the server is shut down or restarted.",
|
||||||
put(T2C_LanguageEnum.english, List.of("If this option is enabled, all players on the server (spigot, paper, etc.) will have their inventory / GUIs closed when the server is shut down or restarted.",
|
"(This does not mean the entire network if a proxy is used)"));
|
||||||
"(This does not mean the entire network if a proxy is used)"));
|
|
||||||
|
|
||||||
}}),
|
}}),
|
||||||
|
|
||||||
space_command("command", null, true,
|
space_command("command", null, true, new HashMap<>() {{
|
||||||
new HashMap<>() {{
|
put(T2C_LanguageEnum.german, List.of());
|
||||||
put(T2C_LanguageEnum.german, List.of());
|
put(T2C_LanguageEnum.english, List.of());
|
||||||
put(T2C_LanguageEnum.english, List.of());
|
}}),
|
||||||
}}),
|
|
||||||
|
|
||||||
commandPermToggleCommand("command.permToggle.permissionSetCommand", "lp user [player] permission set [perm] [value]", true,
|
commandPermToggleCommand("command.permToggle.permissionSetCommand", "lp user [player] permission set [perm] [value]", true, new HashMap<>() {{
|
||||||
new HashMap<>() {{
|
put(T2C_LanguageEnum.german, List.of("Diese Option gibt an, welcher Befehl für den T2CodeLib-Befehl '/t2code permtoggle <player> <permission>' verwendet werden soll."));
|
||||||
put(T2C_LanguageEnum.german, List.of("Diese Option gibt an, welcher Befehl für den T2CodeLib-Befehl '/t2code permtoggle <player> <permission>' verwendet werden soll."));
|
put(T2C_LanguageEnum.english, List.of("This option specifies which command is to be used for the T2CodeLib command '/t2code permtoggle <player> <permission>'."));
|
||||||
put(T2C_LanguageEnum.english, List.of("This option specifies which command is to be used for the T2CodeLib command '/t2code permtoggle <player> <permission>'."));
|
}}),
|
||||||
}}),
|
|
||||||
;
|
;
|
||||||
|
|
||||||
private final String path;
|
private final String path;
|
||||||
@ -147,7 +133,6 @@ public class T2C_LibConfig {
|
|||||||
|
|
||||||
public static void set(boolean isReload) {
|
public static void set(boolean isReload) {
|
||||||
long long_ = System.currentTimeMillis();
|
long long_ = System.currentTimeMillis();
|
||||||
// ConvertT2ClibConfig.convert(); todo
|
|
||||||
T2C_ConfigWriter.createConfig(T2C_Util.getPrefix(), new File(T2C_Main.getPath(), "config.yml"), VALUES.values(), isReload, T2C_Util.getConfigLogo());
|
T2C_ConfigWriter.createConfig(T2C_Util.getPrefix(), new File(T2C_Main.getPath(), "config.yml"), VALUES.values(), isReload, T2C_Util.getConfigLogo());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -103,6 +103,5 @@ public class T2CLibLanguages {
|
|||||||
|
|
||||||
public static void set(boolean isReload) {
|
public static void set(boolean isReload) {
|
||||||
T2C_LanguageWriter.createConfig(T2C_Util.getPrefix(), T2C_Main.getPath(), VALUES.values(), T2C_LibConfig.VALUES.language.getValue().toString(), isReload, T2C_Util.getConfigLogo());
|
T2C_LanguageWriter.createConfig(T2C_Util.getPrefix(), T2C_Main.getPath(), VALUES.values(), T2C_LibConfig.VALUES.language.getValue().toString(), isReload, T2C_Util.getConfigLogo());
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user