12.1
- rename the Main to T2CodeMain - amalll bugfix
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
package net.t2code.lib.Spigot.system.languages;
|
||||
|
||||
import net.t2code.lib.Spigot.Lib.messages.send;
|
||||
import net.t2code.lib.Spigot.system.Main;
|
||||
import net.t2code.lib.Spigot.system.T2CodeMain;
|
||||
import net.t2code.lib.Spigot.Lib.yamlConfiguration.Config;
|
||||
import org.bukkit.configuration.file.YamlConfiguration;
|
||||
import org.bukkit.plugin.Plugin;
|
||||
@@ -10,10 +10,10 @@ import java.io.File;
|
||||
import java.io.IOException;
|
||||
|
||||
public class LanguagesCreate {
|
||||
static Plugin plugin = Main.plugin;
|
||||
static Plugin plugin = T2CodeMain.getPlugin();
|
||||
|
||||
public static void langCreate() {
|
||||
send.debug(plugin,"§4Language files are created / updated...");
|
||||
send.debug(plugin, "§4Language files are created / updated...");
|
||||
Long long_ = Long.valueOf(System.currentTimeMillis());
|
||||
|
||||
/**
|
||||
@@ -22,7 +22,7 @@ public class LanguagesCreate {
|
||||
*
|
||||
*/
|
||||
|
||||
File messagesEN = new File(Main.getPath(), "languages/english_messages.yml");
|
||||
File messagesEN = new File(T2CodeMain.getPath(), "languages/english_messages.yml");
|
||||
YamlConfiguration yamlConfigurationEN = YamlConfiguration.loadConfiguration(messagesEN);
|
||||
|
||||
Config.set("Plugin.VaultNotSetUp", MSG.EN_VaultNotSetUp, yamlConfigurationEN);
|
||||
@@ -32,7 +32,7 @@ public class LanguagesCreate {
|
||||
try {
|
||||
yamlConfigurationEN.save(messagesEN);
|
||||
} catch (IOException e) {
|
||||
send.warning(Main.plugin,e.getMessage());
|
||||
send.warning(T2CodeMain.getPlugin(), e.getMessage());
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
@@ -42,7 +42,7 @@ public class LanguagesCreate {
|
||||
*
|
||||
*/
|
||||
|
||||
File messagesDE = new File(Main.getPath(), "languages/german_messages.yml");
|
||||
File messagesDE = new File(T2CodeMain.getPath(), "languages/german_messages.yml");
|
||||
YamlConfiguration yamlConfigurationDE = YamlConfiguration.loadConfiguration(messagesDE);
|
||||
|
||||
Config.set("Plugin.VaultNotSetUp", MSG.DE_VotingPluginNotSetUp, yamlConfigurationDE);
|
||||
@@ -52,7 +52,7 @@ public class LanguagesCreate {
|
||||
try {
|
||||
yamlConfigurationDE.save(messagesDE);
|
||||
} catch (IOException e) {
|
||||
send.warning(Main.plugin,e.getMessage());
|
||||
send.warning(T2CodeMain.getPlugin(), e.getMessage());
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
@@ -62,7 +62,7 @@ public class LanguagesCreate {
|
||||
*
|
||||
*/
|
||||
|
||||
File messagesNO = new File(Main.getPath(), "languages/norwegian_messages.yml");
|
||||
File messagesNO = new File(T2CodeMain.getPath(), "languages/norwegian_messages.yml");
|
||||
YamlConfiguration yamlConfigurationNO = YamlConfiguration.loadConfiguration(messagesNO);
|
||||
|
||||
Config.set("Plugin.VaultNotSetUp", MSG.NO_VaultNotSetUp, yamlConfigurationNO);
|
||||
@@ -72,10 +72,10 @@ public class LanguagesCreate {
|
||||
try {
|
||||
yamlConfigurationNO.save(messagesNO);
|
||||
} catch (IOException e) {
|
||||
send.warning(Main.plugin,e.getMessage());
|
||||
send.warning(T2CodeMain.getPlugin(), e.getMessage());
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
send.console(Main.prefix + " §2Language files were successfully created / updated." + " §7- §e" + (System.currentTimeMillis() - long_.longValue()) + "ms");
|
||||
send.console(T2CodeMain.getPrefix() + " §2Language files were successfully created / updated." + " §7- §e" + (System.currentTimeMillis() - long_.longValue()) + "ms");
|
||||
}
|
||||
}
|
||||
|
@@ -2,7 +2,7 @@ package net.t2code.lib.Spigot.system.languages;
|
||||
|
||||
import net.t2code.lib.Spigot.Lib.messages.send;
|
||||
import net.t2code.lib.Spigot.Lib.replace.Replace;
|
||||
import net.t2code.lib.Spigot.system.Main;
|
||||
import net.t2code.lib.Spigot.system.T2CodeMain;
|
||||
import net.t2code.lib.Spigot.system.config.SelectLibConfig;
|
||||
import org.bukkit.configuration.file.YamlConfiguration;
|
||||
import org.bukkit.plugin.Plugin;
|
||||
@@ -10,8 +10,8 @@ import org.bukkit.plugin.Plugin;
|
||||
import java.io.File;
|
||||
|
||||
public class SelectLibMsg {
|
||||
private static Plugin plugin = Main.plugin;
|
||||
private static String prefix = Main.prefix;
|
||||
private static Plugin plugin = T2CodeMain.getPlugin();
|
||||
private static String prefix = T2CodeMain.getPrefix();
|
||||
|
||||
public static String selectMSG;
|
||||
|
||||
@@ -26,7 +26,7 @@ public class SelectLibMsg {
|
||||
|
||||
File msg;
|
||||
|
||||
msg = new File(Main.getPath(), "languages/" + SelectLibConfig.language + "_messages.yml");
|
||||
msg = new File(T2CodeMain.getPath(), "languages/" + SelectLibConfig.language + "_messages.yml");
|
||||
if (!msg.isFile()) {
|
||||
send.console(Prefix);
|
||||
send.console(Prefix + " §4!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!");
|
||||
@@ -34,7 +34,7 @@ public class SelectLibMsg {
|
||||
send.console(Prefix + " §6The default language §eEnglish §6is used!");
|
||||
send.console(Prefix + " §4!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!");
|
||||
send.console(Prefix);
|
||||
msg = new File(Main.getPath(), "languages/" + "english_messages.yml");
|
||||
msg = new File(T2CodeMain.getPath(), "languages/" + "english_messages.yml");
|
||||
selectMSG = "english";
|
||||
} else selectMSG = SelectLibConfig.language;
|
||||
YamlConfiguration yamlConfiguration_msg = YamlConfiguration.loadConfiguration(msg);
|
||||
|
Reference in New Issue
Block a user