2.7.1 | Bug fixes
Bug fixes: - When sneaking and using the UseItem, an error occurred. - The config.yml was not reloaded on '/commandgui admin reload' and the change was rolled back - The command '/gui-item slot <slot>' was calculated incorrectly and it often came the message that the selected slot was occupied although it was not.
This commit is contained in:
@@ -19,9 +19,6 @@ import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class SelectConfig {
|
||||
|
||||
private static final File config = new File(Main.getPath(), "config.yml");
|
||||
private static final YamlConfiguration yamlConfiguration = YamlConfiguration.loadConfiguration(config);
|
||||
public static Boolean Debug;
|
||||
public static Boolean HelpAlias;
|
||||
public static String language;
|
||||
@@ -117,6 +114,9 @@ public class SelectConfig {
|
||||
|
||||
|
||||
public static void onSelect() {
|
||||
File config = new File(Main.getPath(), "config.yml");
|
||||
YamlConfiguration yamlConfiguration = YamlConfiguration.loadConfiguration(config);
|
||||
|
||||
if (yamlConfiguration.getInt("ConfigVersion") < Util.getConfigVersion() && new File(Main.getPath(), "config.yml").exists()) {
|
||||
send.console(Util.getPrefix() + " §4----------------------");
|
||||
send.console(Util.getPrefix() + " ");
|
||||
@@ -189,7 +189,7 @@ public class SelectConfig {
|
||||
UseItemWorldMode = yamlConfiguration.getString("Advanced.UseItem.World.Protection.Mode");
|
||||
UseItemWorldList = yamlConfiguration.getStringList("Advanced.UseItem.World.Protection.List");
|
||||
|
||||
if (yamlConfiguration.get("Advanced.UseItem.DisableInfoBySneak") != null){
|
||||
if (yamlConfiguration.get("Advanced.UseItem.DisableInfoBySneak") != null) {
|
||||
disableInfoBySneak = yamlConfiguration.getBoolean("Advanced.UseItem.DisableInfoBySneak");
|
||||
}
|
||||
|
||||
@@ -221,7 +221,6 @@ public class SelectConfig {
|
||||
Sound_Give_input = (yamlConfiguration.getString("Sound.Give.Sound").toUpperCase().replace(".", "_"));
|
||||
Sound_PlayerNotFound_Enable = yamlConfiguration.getBoolean("Sound.PlayerNotFound.Enable");
|
||||
Sound_PlayerNotFound_input = (yamlConfiguration.getString("Sound.PlayerNotFound.Sound").toUpperCase().replace(".", "_"));
|
||||
setConfigVersion();
|
||||
}
|
||||
|
||||
|
||||
@@ -345,7 +344,9 @@ public class SelectConfig {
|
||||
|
||||
}
|
||||
|
||||
private static void setConfigVersion() {
|
||||
public static void setConfigVersion() {
|
||||
File config = new File(Main.getPath(), "config.yml");
|
||||
YamlConfiguration yamlConfiguration = YamlConfiguration.loadConfiguration(config);
|
||||
yamlConfiguration.set("ConfigVersion", Util.getConfigVersion());
|
||||
try {
|
||||
yamlConfiguration.save(config);
|
||||
|
Reference in New Issue
Block a user