7.5
This commit is contained in:
@@ -40,7 +40,7 @@ public class Config {
|
||||
}
|
||||
}
|
||||
|
||||
public static void set(String path, List value, YamlConfiguration YamlConfiguration) {
|
||||
public static void set(String path, List<String> value, YamlConfiguration YamlConfiguration) {
|
||||
if (!YamlConfiguration.contains(path)) {
|
||||
YamlConfiguration.set(path, value);
|
||||
}
|
||||
@@ -93,16 +93,7 @@ public class Config {
|
||||
SOUND = sound1_9;
|
||||
} else SOUND = sound1_13;
|
||||
|
||||
try {
|
||||
Sound sound_Buy = Sound.valueOf(selectSoundFromConfig);
|
||||
if (sound_Buy != null) {
|
||||
return sound_Buy;
|
||||
} else return null;
|
||||
} catch (Exception e) {
|
||||
send.console("§4\n§4\n§4\n" + SelectLibMsg.SoundNotFound.replace("[prefix]", prefix)
|
||||
.replace("[sound]", "§8Buy: §6" + selectSoundFromConfig) + "§4\n§4\n§4\n");
|
||||
return Sound.valueOf(SOUND);
|
||||
}
|
||||
return checkSound(SOUND, selectSoundFromConfig, prefix);
|
||||
}
|
||||
|
||||
public static Sound checkSound(String sound1_8, String sound1_13, String selectSoundFromConfig, String prefix) {
|
||||
@@ -111,24 +102,12 @@ public class Config {
|
||||
SOUND = sound1_8;
|
||||
} else SOUND = sound1_13;
|
||||
|
||||
try {
|
||||
Sound sound_Buy = Sound.valueOf(selectSoundFromConfig);
|
||||
if (sound_Buy != null) {
|
||||
return sound_Buy;
|
||||
} else return null;
|
||||
} catch (Exception e) {
|
||||
send.console("§4\n§4\n§4\n" + SelectLibMsg.SoundNotFound.replace("[prefix]", prefix)
|
||||
.replace("[sound]", "§8Buy: §6" + selectSoundFromConfig) + "§4\n§4\n§4\n");
|
||||
return Sound.valueOf(SOUND);
|
||||
}
|
||||
return checkSound(SOUND, selectSoundFromConfig, prefix);
|
||||
}
|
||||
|
||||
public static Sound checkSound(String sound, String selectSoundFromConfig, String prefix) {
|
||||
try {
|
||||
Sound sound_Buy = Sound.valueOf(selectSoundFromConfig);
|
||||
if (sound_Buy != null) {
|
||||
return sound_Buy;
|
||||
} else return null;
|
||||
return Sound.valueOf(selectSoundFromConfig);
|
||||
} catch (Exception e) {
|
||||
send.console("§4\n§4\n§4\n" + SelectLibMsg.SoundNotFound.replace("[prefix]", prefix)
|
||||
.replace("[sound]", "§8Buy: §6" + selectSoundFromConfig) + "§4\n§4\n§4\n");
|
||||
@@ -153,8 +132,8 @@ public class Config {
|
||||
return (yamlConfiguration.getDouble(path));
|
||||
}
|
||||
|
||||
public static List selectList(String path, YamlConfiguration yamlConfiguration) {
|
||||
return (yamlConfiguration.getList(path));
|
||||
public static List<String> selectList(String path, YamlConfiguration yamlConfiguration) {
|
||||
return (yamlConfiguration.getStringList(path));
|
||||
}
|
||||
|
||||
public static ItemStack selectItemStack(String path, YamlConfiguration yamlConfiguration) {
|
||||
@@ -162,7 +141,7 @@ public class Config {
|
||||
}
|
||||
|
||||
|
||||
public static List selectList(String prefix, String path, YamlConfiguration yamlConfiguration) {
|
||||
public static List<String> selectList(String prefix, String path, YamlConfiguration yamlConfiguration) {
|
||||
List<String> output = new ArrayList<>();
|
||||
List<String> input = yamlConfiguration.getStringList(path);
|
||||
for (String st : input) {
|
||||
@@ -171,7 +150,7 @@ public class Config {
|
||||
return output;
|
||||
}
|
||||
|
||||
public static void select(String prefix, List value, String path, YamlConfiguration yamlConfiguration) {
|
||||
public static void select(String prefix, List<String> value, String path, YamlConfiguration yamlConfiguration) {
|
||||
List<String> output = new ArrayList<>();
|
||||
List<String> input = yamlConfiguration.getStringList(path);
|
||||
for (String st : input) {
|
||||
|
Reference in New Issue
Block a user