insert
This commit is contained in:
@@ -12,150 +12,144 @@ import java.util.List;
|
||||
|
||||
|
||||
public class DefaultGUICreate {
|
||||
|
||||
private static Boolean GUI_Enable = true;
|
||||
private static Integer GUI_Lines = 1;
|
||||
private static String GUI_Name = "&5default &9GUI";
|
||||
private static Boolean GUI_FillItem_Enable = true;
|
||||
private static Integer GUI_FillItem_Item_1_8 = 15;
|
||||
private static String GUI_FillItem_Item = "BLACK_STAINED_GLASS_PANE";
|
||||
|
||||
private static Boolean Command_Alias = true;
|
||||
private static Boolean Command_Permission = true;
|
||||
|
||||
private static Integer slot = 5;
|
||||
private static Boolean enable = true;
|
||||
private static Boolean ItemEmty = false;
|
||||
private static Integer ItemAmout = 1;
|
||||
private static Boolean Playerhead_enable = true;
|
||||
private static Boolean base64_Enable = true;
|
||||
private static String base64value = "eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvNzg3M2MxMmJmZmI1MjUxYTBiODhkNWFlNzVjNzI0N2NiMzlhNzVmZjFhODFjYmU0YzhhMzliMzExZGRlZGEifX19";
|
||||
private static Boolean PlayerWhoHasOpenedTheGUI = false;
|
||||
private static String PlayerName = "";
|
||||
private static String Item = "";
|
||||
private static String Itemname = "&3Support Discord";
|
||||
private static List ItemLore = Arrays.asList(
|
||||
"&8-----------------",
|
||||
"&bIf you need help setting up the plugin,",
|
||||
"&bfeel free to contact me on the Suport Discord.",
|
||||
"&8-----------------",
|
||||
"&eIf you find any errors or bugs,",
|
||||
"&eplease contact me so I can fix them.",
|
||||
"&8-----------------",
|
||||
"&5Discord: §7http://dc.t2code.net");
|
||||
private static Boolean CustomSound = false;
|
||||
private static Boolean CustomSound_NoSound = false;
|
||||
private static String CustomSound_Sound = "";
|
||||
private static Boolean Cost = false;
|
||||
private static Double Cost_Price = 0.0;
|
||||
private static Boolean Command = false;
|
||||
private static Boolean BungeeCommand = false;
|
||||
private static Boolean CommandAsConsole = false;
|
||||
private static List Commands = Arrays.asList();
|
||||
private static Boolean Server_Change = false;
|
||||
private static String Server_Change_Server = "";
|
||||
private static Boolean OpenGUI = false;
|
||||
private static String OpenGUI_GUI = "";
|
||||
private static Boolean Message = true;
|
||||
private static List Messages = Arrays.asList("&6You can find more information on Discord: &ehttp://dc.t2code.net");
|
||||
private static Boolean Permission = false;
|
||||
|
||||
private static Boolean SetConfig_Enable = false;
|
||||
private static String SetConfig_FilePath = "";
|
||||
private static String SetConfig_OptionPath = "";
|
||||
private static String SetConfig_OptionPremat = "String";
|
||||
|
||||
private static String SetConfig_ValueLeftString = "";
|
||||
private static Boolean SetConfig_ValueLeftBoolean = false;
|
||||
private static Integer SetConfig_ValueLeftInteger = 0;
|
||||
private static Double SetConfig_ValueLeftDouble = 0.0;
|
||||
private static List SetConfig_ValueLeftList = Arrays.asList();
|
||||
|
||||
private static String SetConfig_ValueRightString = "";
|
||||
private static Boolean SetConfig_ValueRightBoolean = false;
|
||||
private static Integer SetConfig_ValueRightInteger = 0;
|
||||
private static Double SetConfig_ValueRightDouble = 0.0;
|
||||
private static List SetConfig_ValueRightList = Arrays.asList();
|
||||
|
||||
private static Boolean SetConfig_PluginReloadEnable = false;
|
||||
private static String SetConfig_PluginReloadCommand = "";
|
||||
|
||||
|
||||
|
||||
public static void configCreate() {
|
||||
Long long_ = Long.valueOf(System.currentTimeMillis());
|
||||
send.console(Main.prefix + " §4Default GUI file (GUIs/default.yml) is loaded...");
|
||||
File config = new File(Main.getPath(), "GUIs/default.yml");
|
||||
YamlConfiguration yamlConfiguration = YamlConfiguration.loadConfiguration(config);
|
||||
|
||||
set("GUI.Enable", GUI_Enable, yamlConfiguration);
|
||||
set("GUI.Lines", GUI_Lines, yamlConfiguration);
|
||||
set("GUI.Name", GUI_Name, yamlConfiguration);
|
||||
set("GUI.FillItem.Enable", GUI_FillItem_Enable, yamlConfiguration);
|
||||
set("GUI.Enable", true, yamlConfiguration);
|
||||
set("GUI.Lines", 1, yamlConfiguration);
|
||||
set("GUI.Name", "&5default &9GUI", yamlConfiguration);
|
||||
set("GUI.FillItem.Enable", true, yamlConfiguration);
|
||||
if (MCVersion.minecraft1_8 || MCVersion.minecraft1_9 || MCVersion.minecraft1_10 || MCVersion.minecraft1_11 || MCVersion.minecraft1_12) {
|
||||
set("GUI.FillItem.GlassPaneCollor", GUI_FillItem_Item_1_8, yamlConfiguration);
|
||||
} else set("GUI.FillItem.Item", GUI_FillItem_Item, yamlConfiguration);
|
||||
set("GUI.FillItem.GlassPaneCollor", 15, yamlConfiguration);
|
||||
} else set("GUI.FillItem.Item", "BLACK_STAINED_GLASS_PANE", yamlConfiguration);
|
||||
|
||||
set("Command.Alias", Command_Alias, yamlConfiguration);
|
||||
set("Command.Permission.Required", Command_Permission, yamlConfiguration);
|
||||
set("Slots.Example.Slot", slot, yamlConfiguration);
|
||||
set("Slots.Example.Enable", enable, yamlConfiguration);
|
||||
set("Slots.Example.Item.Empty", ItemEmty, yamlConfiguration);
|
||||
set("Slots.Example.Item.Amount", ItemAmout, yamlConfiguration);
|
||||
set("Command.Alias", true, yamlConfiguration);
|
||||
set("Command.Permission.Required", true, yamlConfiguration);
|
||||
set("Slots.SupportDiscord.Slot", 4, yamlConfiguration);
|
||||
set("Slots.SupportDiscord.Enable", true, yamlConfiguration);
|
||||
set("Slots.SupportDiscord.Item.Empty", false, yamlConfiguration);
|
||||
set("Slots.SupportDiscord.Item.Amount", 1, yamlConfiguration);
|
||||
if (!(MCVersion.minecraft1_8 || MCVersion.minecraft1_9 || MCVersion.minecraft1_10 || MCVersion.minecraft1_11 || MCVersion.minecraft1_12)) {
|
||||
set("Slots.Example.Item.PlayerHead.Enable", Playerhead_enable, yamlConfiguration);
|
||||
set("Slots.Example.Item.PlayerHead.Base64.Enable", base64_Enable, yamlConfiguration);
|
||||
set("Slots.Example.Item.PlayerHead.Base64.Base64Value", base64value, yamlConfiguration);
|
||||
set("Slots.Example.Item.PlayerHead.PlayerWhoHasOpenedTheGUI", PlayerWhoHasOpenedTheGUI, yamlConfiguration);
|
||||
set("Slots.Example.Item.PlayerHead.PlayerName", PlayerName, yamlConfiguration);
|
||||
set("Slots.SupportDiscord.Item.PlayerHead.Enable", true, yamlConfiguration);
|
||||
set("Slots.SupportDiscord.Item.PlayerHead.Base64.Enable", true, yamlConfiguration);
|
||||
set("Slots.SupportDiscord.Item.PlayerHead.Base64.Base64Value", "eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvNzg3M2MxMmJmZmI1MjUxYTBiODhkNWFlNzVjNzI0N2NiMzlhNzVmZjFhODFjYmU0YzhhMzliMzExZGRlZGEifX19", yamlConfiguration);
|
||||
set("Slots.SupportDiscord.Item.PlayerHead.PlayerWhoHasOpenedTheGUI", false, yamlConfiguration);
|
||||
set("Slots.SupportDiscord.Item.PlayerHead.PlayerName", "", yamlConfiguration);
|
||||
}
|
||||
if (MCVersion.minecraft1_8 || MCVersion.minecraft1_9 || MCVersion.minecraft1_10 || MCVersion.minecraft1_11 || MCVersion.minecraft1_12) {
|
||||
set("Slots.Example.Item.Material", "TNT", yamlConfiguration);
|
||||
} else set("Slots.Example.Item.Material", Item, yamlConfiguration);
|
||||
set("Slots.Example.Item.Name", Itemname, yamlConfiguration);
|
||||
set("Slots.Example.Item.Lore", ItemLore, yamlConfiguration);
|
||||
set("Slots.Example.CustomSound.Enable", CustomSound, yamlConfiguration);
|
||||
set("Slots.Example.CustomSound.NoSound", CustomSound_NoSound, yamlConfiguration);
|
||||
set("Slots.Example.CustomSound.Sound", CustomSound_Sound, yamlConfiguration);
|
||||
set("Slots.Example.Cost.Enable", Cost, yamlConfiguration);
|
||||
set("Slots.Example.Cost.Price", Cost_Price, yamlConfiguration);
|
||||
set("Slots.Example.Command.Enable", Command, yamlConfiguration);
|
||||
set("Slots.Example.Command.BungeeCommand", BungeeCommand, yamlConfiguration);
|
||||
set("Slots.Example.Command.CommandAsConsole", CommandAsConsole, yamlConfiguration);
|
||||
set("Slots.Example.Command.Command", Commands, yamlConfiguration);
|
||||
set("Slots.Example.ServerChange.Enable", Server_Change, yamlConfiguration);
|
||||
set("Slots.Example.ServerChange.Server", Server_Change_Server, yamlConfiguration);
|
||||
set("Slots.Example.OpenGUI.Enable", OpenGUI, yamlConfiguration);
|
||||
set("Slots.Example.OpenGUI.GUI", OpenGUI_GUI, yamlConfiguration);
|
||||
set("Slots.Example.Message.Enable", Message, yamlConfiguration);
|
||||
set("Slots.Example.Message.Message", Messages, yamlConfiguration);
|
||||
set("Slots.Example.Permission.Required", Permission, yamlConfiguration);
|
||||
set("Slots.SupportDiscord.Item.Material", "TNT", yamlConfiguration);
|
||||
} else set("Slots.SupportDiscord.Item.Material", "", yamlConfiguration);
|
||||
set("Slots.SupportDiscord.Item.Name", "&3Support Discord", yamlConfiguration);
|
||||
set("Slots.SupportDiscord.Item.Lore", Arrays.asList("&8-----------------", "&bIf you need help setting up the plugin,", "&bfeel free to contact me on the Suport Discord.",
|
||||
"&8-----------------", "&eIf you find any errors or bugs,", "&eplease contact me so I can fix them.", "&8-----------------", "&5Discord: §7http://dc.t2code.net"),
|
||||
yamlConfiguration);
|
||||
set("Slots.SupportDiscord.CustomSound.Enable", false, yamlConfiguration);
|
||||
set("Slots.SupportDiscord.CustomSound.NoSound", false, yamlConfiguration);
|
||||
set("Slots.SupportDiscord.CustomSound.Sound", "", yamlConfiguration);
|
||||
set("Slots.SupportDiscord.Cost.Enable", false, yamlConfiguration);
|
||||
set("Slots.SupportDiscord.Cost.Price", 0.0, yamlConfiguration);
|
||||
set("Slots.SupportDiscord.Command.Enable", false, yamlConfiguration);
|
||||
set("Slots.SupportDiscord.Command.BungeeCommand", false, yamlConfiguration);
|
||||
set("Slots.SupportDiscord.Command.CommandAsConsole", false, yamlConfiguration);
|
||||
set("Slots.SupportDiscord.Command.Command", Arrays.asList(), yamlConfiguration);
|
||||
set("Slots.SupportDiscord.ServerChange.Enable", false, yamlConfiguration);
|
||||
set("Slots.SupportDiscord.ServerChange.Server", "", yamlConfiguration);
|
||||
set("Slots.SupportDiscord.OpenGUI.Enable", false, yamlConfiguration);
|
||||
set("Slots.SupportDiscord.OpenGUI.GUI", "", yamlConfiguration);
|
||||
|
||||
set("Slots.Example.SetConfig.Enable", SetConfig_Enable, yamlConfiguration);
|
||||
set("Slots.Example.SetConfig.File.Path", SetConfig_FilePath, yamlConfiguration);
|
||||
set("Slots.Example.SetConfig.Option.Path", SetConfig_OptionPath, yamlConfiguration);
|
||||
set("Slots.Example.SetConfig.Option.Premat", SetConfig_OptionPremat, yamlConfiguration);
|
||||
set("Slots.Example.SetConfig.Value.LeftClick.String", SetConfig_ValueLeftString, yamlConfiguration);
|
||||
set("Slots.Example.SetConfig.Value.LeftClick.Boolean", SetConfig_ValueLeftBoolean, yamlConfiguration);
|
||||
set("Slots.Example.SetConfig.Value.LeftClick.Integer", SetConfig_ValueLeftInteger, yamlConfiguration);
|
||||
set("Slots.Example.SetConfig.Value.LeftClick.Double", SetConfig_ValueLeftDouble, yamlConfiguration);
|
||||
set("Slots.Example.SetConfig.Value.LeftClick.List", SetConfig_ValueLeftList, yamlConfiguration);
|
||||
set("Slots.Example.SetConfig.Value.RightClick.String", SetConfig_ValueRightString, yamlConfiguration);
|
||||
set("Slots.Example.SetConfig.Value.RightClick.Boolean", SetConfig_ValueRightBoolean, yamlConfiguration);
|
||||
set("Slots.Example.SetConfig.Value.RightClick.Integer", SetConfig_ValueRightInteger, yamlConfiguration);
|
||||
set("Slots.Example.SetConfig.Value.RightClick.Double", SetConfig_ValueRightDouble, yamlConfiguration);
|
||||
set("Slots.Example.SetConfig.Value.RightClick.List", SetConfig_ValueRightList, yamlConfiguration);
|
||||
set("Slots.Example.SetConfig.PluginReload.Enable", SetConfig_PluginReloadEnable, yamlConfiguration);
|
||||
set("Slots.Example.SetConfig.PluginReload.Command", SetConfig_PluginReloadCommand, yamlConfiguration);
|
||||
set("Slots.SupportDiscord.Toggle.Permission.Enable", false, yamlConfiguration);
|
||||
|
||||
set("Slots.SupportDiscord.Toggle.Permission.Permission", "", yamlConfiguration);
|
||||
|
||||
set("Slots.SupportDiscord.Toggle.UseItem.Enable", false, yamlConfiguration);
|
||||
|
||||
set("Slots.SupportDiscord.Message.Enable", true, yamlConfiguration);
|
||||
set("Slots.SupportDiscord.Message.Message", Arrays.asList("&6You can find more information on Discord: &ehttp://dc.t2code.net"), yamlConfiguration);
|
||||
set("Slots.SupportDiscord.Permission.Required", false, yamlConfiguration);
|
||||
|
||||
set("Slots.SupportDiscord.SetConfig.Enable", false, yamlConfiguration);
|
||||
set("Slots.SupportDiscord.SetConfig.File.Path", "", yamlConfiguration);
|
||||
set("Slots.SupportDiscord.SetConfig.Option.Path", "", yamlConfiguration);
|
||||
set("Slots.SupportDiscord.SetConfig.Option.Premat", "String", yamlConfiguration);
|
||||
set("Slots.SupportDiscord.SetConfig.Value.LeftClick.String", "", yamlConfiguration);
|
||||
set("Slots.SupportDiscord.SetConfig.Value.LeftClick.Boolean", false, yamlConfiguration);
|
||||
set("Slots.SupportDiscord.SetConfig.Value.LeftClick.Integer", 0, yamlConfiguration);
|
||||
set("Slots.SupportDiscord.SetConfig.Value.LeftClick.Double", 0.0, yamlConfiguration);
|
||||
set("Slots.SupportDiscord.SetConfig.Value.LeftClick.List", Arrays.asList(), yamlConfiguration);
|
||||
set("Slots.SupportDiscord.SetConfig.Value.RightClick.String", "", yamlConfiguration);
|
||||
set("Slots.SupportDiscord.SetConfig.Value.RightClick.Boolean", false, yamlConfiguration);
|
||||
set("Slots.SupportDiscord.SetConfig.Value.RightClick.Integer", 0, yamlConfiguration);
|
||||
set("Slots.SupportDiscord.SetConfig.Value.RightClick.Double", 0.0, yamlConfiguration);
|
||||
set("Slots.SupportDiscord.SetConfig.Value.RightClick.List", Arrays.asList(), yamlConfiguration);
|
||||
set("Slots.SupportDiscord.SetConfig.PluginReload.Enable", false, yamlConfiguration);
|
||||
set("Slots.SupportDiscord.SetConfig.PluginReload.Command", "", yamlConfiguration);
|
||||
|
||||
set("Slots.UseItem.Slot", 6, yamlConfiguration);
|
||||
set("Slots.UseItem.Enable", true, yamlConfiguration);
|
||||
set("Slots.UseItem.Item.Empty", false, yamlConfiguration);
|
||||
set("Slots.UseItem.Item.Amount", 1, yamlConfiguration);
|
||||
if (!(MCVersion.minecraft1_8 || MCVersion.minecraft1_9 || MCVersion.minecraft1_10 || MCVersion.minecraft1_11 || MCVersion.minecraft1_12)) {
|
||||
set("Slots.UseItem.Item.PlayerHead.Enable", false, yamlConfiguration);
|
||||
set("Slots.UseItem.Item.PlayerHead.Base64.Enable", false, yamlConfiguration);
|
||||
set("Slots.UseItem.Item.PlayerHead.Base64.Base64Value", "", yamlConfiguration);
|
||||
set("Slots.UseItem.Item.PlayerHead.PlayerWhoHasOpenedTheGUI", false, yamlConfiguration);
|
||||
set("Slots.UseItem.Item.PlayerHead.PlayerName", "", yamlConfiguration);
|
||||
}
|
||||
if (MCVersion.minecraft1_8 || MCVersion.minecraft1_9 || MCVersion.minecraft1_10 || MCVersion.minecraft1_11 || MCVersion.minecraft1_12) {
|
||||
set("Slots.UseItem.Item.Material", "", yamlConfiguration);
|
||||
} else set("Slots.UseItem.Item.Material", "", yamlConfiguration);
|
||||
set("Slots.UseItem.Item.Name", "&6Toggle UseItem", yamlConfiguration);
|
||||
set("Slots.UseItem.Item.Lore", Arrays.asList("&bYou currently have the UseItem set to: %commandgui_useitem%"),
|
||||
yamlConfiguration);
|
||||
set("Slots.UseItem.CustomSound.Enable", false, yamlConfiguration);
|
||||
set("Slots.UseItem.CustomSound.NoSound", false, yamlConfiguration);
|
||||
set("Slots.UseItem.CustomSound.Sound", "", yamlConfiguration);
|
||||
set("Slots.UseItem.Cost.Enable", false, yamlConfiguration);
|
||||
set("Slots.UseItem.Cost.Price", 0.0, yamlConfiguration);
|
||||
set("Slots.UseItem.Command.Enable", false, yamlConfiguration);
|
||||
set("Slots.UseItem.Command.BungeeCommand", false, yamlConfiguration);
|
||||
set("Slots.UseItem.Command.CommandAsConsole", false, yamlConfiguration);
|
||||
set("Slots.UseItem.Command.Command", Arrays.asList(), yamlConfiguration);
|
||||
set("Slots.UseItem.ServerChange.Enable", false, yamlConfiguration);
|
||||
set("Slots.UseItem.ServerChange.Server", "", yamlConfiguration);
|
||||
set("Slots.UseItem.OpenGUI.Enable", false, yamlConfiguration);
|
||||
set("Slots.UseItem.OpenGUI.GUI", "", yamlConfiguration);
|
||||
|
||||
set("Slots.UseItem.Toggle.Permission.Enable", false, yamlConfiguration);
|
||||
|
||||
set("Slots.UseItem.Toggle.Permission.Permission", "", yamlConfiguration);
|
||||
|
||||
set("Slots.UseItem.Toggle.UseItem.Enable", true, yamlConfiguration);
|
||||
|
||||
set("Slots.UseItem.Message.Enable", true, yamlConfiguration);
|
||||
set("Slots.UseItem.Message.Message", Arrays.asList("&bYour UseItem was set to: %commandgui_useitem%&b."), yamlConfiguration);
|
||||
set("Slots.UseItem.Permission.Required", false, yamlConfiguration);
|
||||
|
||||
set("Slots.UseItem.SetConfig.Enable", false, yamlConfiguration);
|
||||
set("Slots.UseItem.SetConfig.File.Path", "", yamlConfiguration);
|
||||
set("Slots.UseItem.SetConfig.Option.Path", "", yamlConfiguration);
|
||||
set("Slots.UseItem.SetConfig.Option.Premat", "String", yamlConfiguration);
|
||||
set("Slots.UseItem.SetConfig.Value.LeftClick.String", "", yamlConfiguration);
|
||||
set("Slots.UseItem.SetConfig.Value.LeftClick.Boolean", false, yamlConfiguration);
|
||||
set("Slots.UseItem.SetConfig.Value.LeftClick.Integer", 0, yamlConfiguration);
|
||||
set("Slots.UseItem.SetConfig.Value.LeftClick.Double", 0.0, yamlConfiguration);
|
||||
set("Slots.UseItem.SetConfig.Value.LeftClick.List", Arrays.asList(), yamlConfiguration);
|
||||
set("Slots.UseItem.SetConfig.Value.RightClick.String", "", yamlConfiguration);
|
||||
set("Slots.UseItem.SetConfig.Value.RightClick.Boolean", false, yamlConfiguration);
|
||||
set("Slots.UseItem.SetConfig.Value.RightClick.Integer", 0, yamlConfiguration);
|
||||
set("Slots.UseItem.SetConfig.Value.RightClick.Double", 0.0, yamlConfiguration);
|
||||
set("Slots.UseItem.SetConfig.Value.RightClick.List", Arrays.asList(), yamlConfiguration);
|
||||
set("Slots.UseItem.SetConfig.PluginReload.Enable", false, yamlConfiguration);
|
||||
set("Slots.UseItem.SetConfig.PluginReload.Command", "", yamlConfiguration);
|
||||
|
||||
try {
|
||||
yamlConfiguration.save(config);
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
|
||||
send.console(Main.prefix + " §2Default GUI file (GUIs/default.yml) was loaded." + " §7- §e" + (System.currentTimeMillis() - long_.longValue()) + "ms");
|
||||
}
|
||||
|
||||
|
@@ -2,6 +2,7 @@ package de.jatitv.commandguiv2.Spigot.config.config;
|
||||
|
||||
import de.jatitv.commandguiv2.Spigot.Main;
|
||||
import de.jatitv.commandguiv2.Util;
|
||||
import net.t2code.lib.Spigot.Lib.items.ItemVersion;
|
||||
import net.t2code.lib.Spigot.Lib.messages.send;
|
||||
import net.t2code.lib.Spigot.Lib.minecraftVersion.MCVersion;
|
||||
import net.t2code.lib.Spigot.Lib.yamlConfiguration.Config;
|
||||
@@ -26,11 +27,11 @@ public class ConfigCreate {
|
||||
YamlConfiguration yamlConfiguration = YamlConfiguration.loadConfiguration(config);
|
||||
|
||||
if (yamlConfiguration.getInt("ConfigVersion") < ConfigVersion && new File(Main.getPath(), "config.yml").exists()) {
|
||||
send.console(Util.getPrefix() +" §4----------------------");
|
||||
send.console(Util.getPrefix() +" ");
|
||||
send.console(Util.getPrefix() +" §6New features have been added to CommandGUI. The Config is adapted!");
|
||||
send.console(Util.getPrefix() +" ");
|
||||
send.console(Util.getPrefix() +" §4----------------------");
|
||||
send.console(Util.getPrefix() + " §4----------------------");
|
||||
send.console(Util.getPrefix() + " ");
|
||||
send.console(Util.getPrefix() + " §6New features have been added to CommandGUI. The Config is adapted!");
|
||||
send.console(Util.getPrefix() + " ");
|
||||
send.console(Util.getPrefix() + " §4----------------------");
|
||||
}
|
||||
|
||||
yamlConfiguration.set("ConfigVersion", ConfigVersion);
|
||||
@@ -110,6 +111,21 @@ public class ConfigCreate {
|
||||
Config.set("Advanced.UseItem.World.Protection.Mode", "blacklist", yamlConfiguration);
|
||||
Config.set("Advanced.UseItem.World.Protection.List", Arrays.asList("World1", "World2"), yamlConfiguration);
|
||||
|
||||
|
||||
Config.set("Toggle.Items.OnOrYes.Item.Base64.Enable", false, yamlConfiguration);
|
||||
Config.set("Toggle.Items.OnOrYes.Item.Base64.Base64Value", "", yamlConfiguration);
|
||||
Config.set("Toggle.Items.OnOrYes.Item.Material", ItemVersion.getGreenWool().getType().toString(), yamlConfiguration);
|
||||
|
||||
Config.set("Toggle.Items.OffOrNo.Item.Base64.Enable", false, yamlConfiguration);
|
||||
Config.set("Toggle.Items.OffOrNo.Item.Base64.Base64Value", "", yamlConfiguration);
|
||||
Config.set("Toggle.Items.OffOrNo.Item.Material", ItemVersion.getRedWool().getType().toString(), yamlConfiguration);
|
||||
|
||||
Config.set("Toggle.Permission.Commands.True", "luckperms user [player] permission set [perm] true", yamlConfiguration);
|
||||
Config.set("Toggle.Permission.Commands.False", "luckperms user [player] permission set [perm] false", yamlConfiguration);
|
||||
|
||||
Config.set("Placeholder.True", "&2true", yamlConfiguration);
|
||||
Config.set("Placeholder.False", "&4false", yamlConfiguration);
|
||||
|
||||
Config.set("Sound.Enable", true, yamlConfiguration);
|
||||
|
||||
Config.set("Sound.OpenInventory.Enable", true, yamlConfiguration);
|
||||
|
@@ -7,6 +7,7 @@ import de.jatitv.commandguiv2.Util;
|
||||
import net.t2code.lib.Spigot.Lib.messages.send;
|
||||
import net.t2code.lib.Spigot.Lib.minecraftVersion.MCVersion;
|
||||
import net.t2code.lib.Spigot.Lib.replace.Replace;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.Sound;
|
||||
import org.bukkit.configuration.file.YamlConfiguration;
|
||||
|
||||
@@ -22,6 +23,7 @@ public class SelectConfig {
|
||||
public static Boolean HelpAlias;
|
||||
public static String language;
|
||||
public static String Currency;
|
||||
public static List<String> mainCommands;
|
||||
|
||||
public static String Storage;
|
||||
|
||||
@@ -69,6 +71,20 @@ public class SelectConfig {
|
||||
public static String UseItem_Name;
|
||||
public static List<String> UseItem_Lore;
|
||||
|
||||
public static Boolean toggleItemOnOrYesBase64;
|
||||
public static String toggleItemOnOrYesBase64Value;
|
||||
public static String toggleItemOnOrYesMaterial;
|
||||
|
||||
public static Boolean toggleItemOffOrNoBase64;
|
||||
public static String toggleItemOffOrNoBase64Value;
|
||||
public static String toggleItemOffOrNoMaterial;
|
||||
|
||||
public static String togglePermTrue;
|
||||
public static String togglePermFalse;
|
||||
|
||||
public static String placeholderTrue;
|
||||
public static String placeholderFalse;
|
||||
|
||||
public static Boolean Sound_Enable = true;
|
||||
|
||||
public static Boolean Sound_OpenInventory_Enable = true;
|
||||
@@ -140,7 +156,7 @@ public class SelectConfig {
|
||||
UseItem_Base64value = yamlConfiguration.getString("UseItem.Item.PlayerHead.Base64.Base64Value");
|
||||
UseItem_PlayerWhoHasOpenedTheGUI = yamlConfiguration.getBoolean("UseItem.Item.PlayerHead.PlayerWhoHasOpenedTheGUI");
|
||||
UseItem_PlayerName = yamlConfiguration.getString("UseItem.Item.PlayerHead.PlayerName");
|
||||
UseItem_Name = Replace.replace(Util.getPrefix(),yamlConfiguration.getString("UseItem.Item.Name"));
|
||||
UseItem_Name = Replace.replace(Util.getPrefix(), yamlConfiguration.getString("UseItem.Item.Name"));
|
||||
UseItem_Lore = yamlConfiguration.getStringList("UseItem.Item.Lore");
|
||||
UseItem_GiveOnEveryJoin = yamlConfiguration.getBoolean("UseItem.Join.GiveOnEveryJoin");
|
||||
UseItem_GiveOnlyOnFirstJoin = yamlConfiguration.getBoolean("UseItem.Join.GiveOnlyOnFirstJoin");
|
||||
@@ -154,7 +170,7 @@ public class SelectConfig {
|
||||
UseItemGameModeRemoveItemWhenItIsDisabled = yamlConfiguration.getBoolean("Advanced.UseItem.GameMode.Protection.RemoveItemWhenItIsDisabled");
|
||||
UseItemGameModeMode = yamlConfiguration.getString("Advanced.UseItem.GameMode.Protection.Mode");
|
||||
List<String> gml = new ArrayList<>();
|
||||
for (String gm : yamlConfiguration.getStringList("Advanced.UseItem.GameMode.Protection.List")){
|
||||
for (String gm : yamlConfiguration.getStringList("Advanced.UseItem.GameMode.Protection.List")) {
|
||||
gml.add(gm.toUpperCase());
|
||||
}
|
||||
UseItemGameModeList = gml;
|
||||
@@ -164,7 +180,22 @@ public class SelectConfig {
|
||||
UseItemWorldProtection = yamlConfiguration.getBoolean("Advanced.UseItem.World.Protection.Enable");
|
||||
UseItemWorldRemoveItemWhenItIsDisabled = yamlConfiguration.getBoolean("Advanced.UseItem.World.Protection.RemoveItemWhenItIsDisabled");
|
||||
UseItemWorldMode = yamlConfiguration.getString("Advanced.UseItem.World.Protection.Mode");
|
||||
UseItemWorldList =yamlConfiguration.getStringList("Advanced.UseItem.World.Protection.List");
|
||||
UseItemWorldList = yamlConfiguration.getStringList("Advanced.UseItem.World.Protection.List");
|
||||
|
||||
|
||||
toggleItemOnOrYesBase64 = yamlConfiguration.getBoolean("Toggle.Items.OnOrYes.Item.Base64.Enable");
|
||||
toggleItemOnOrYesBase64Value = yamlConfiguration.getString("Toggle.Items.OnOrYes.Item.Base64.Base64Value");
|
||||
toggleItemOnOrYesMaterial = yamlConfiguration.getString("Toggle.Items.OnOrYes.Item.Material");
|
||||
|
||||
toggleItemOffOrNoBase64 = yamlConfiguration.getBoolean("Toggle.Items.OffOrNo.Item.Base64.Enable");
|
||||
toggleItemOffOrNoBase64Value = yamlConfiguration.getString("Toggle.Items.OffOrNo.Item.Base64.Base64Value");
|
||||
toggleItemOffOrNoMaterial = yamlConfiguration.getString("Toggle.Items.OffOrNo.Item.Material");
|
||||
|
||||
togglePermTrue = yamlConfiguration.getString("Toggle.Permission.Commands.True");
|
||||
togglePermFalse = yamlConfiguration.getString("Toggle.Permission.Commands.False");
|
||||
|
||||
placeholderTrue = yamlConfiguration.getString("Placeholder.True");
|
||||
placeholderFalse = yamlConfiguration.getString("Placeholder.False");
|
||||
|
||||
Sound_Enable = yamlConfiguration.getBoolean("Sound.Enable");
|
||||
Sound_OpenInventory_Enable = yamlConfiguration.getBoolean("Sound.OpenInventory.Enable");
|
||||
|
Reference in New Issue
Block a user