9
0
mirror of https://github.com/HibiscusMC/HMCCosmetics.git synced 2026-01-04 15:41:45 +00:00

Moved Config Version Error

This commit is contained in:
LoJoSho
2022-11-15 19:15:00 -06:00
parent b7d77d9695
commit 7f363ca344
2 changed files with 11 additions and 11 deletions

View File

@@ -41,16 +41,6 @@ public final class HMCCosmeticsPlugin extends JavaPlugin {
setup();
if (Settings.getConfigVersion() == 0) {
getLogger().severe("");
getLogger().severe("");
getLogger().severe("Improper Configuration Found (Config Version Does Not Exist!)");
getLogger().severe("Problems will happen with the plugin! Delete and regenerate a new one!");
getLogger().severe("");
getLogger().severe("");
return;
}
// Commands
getServer().getPluginCommand("cosmetic").setExecutor(new CosmeticCommand());
getServer().getPluginCommand("cosmetic").setTabCompleter(new CosmeticCommandTabComplete());

View File

@@ -1,5 +1,6 @@
package com.hibiscusmc.hmccosmetics.config;
import com.hibiscusmc.hmccosmetics.HMCCosmeticsPlugin;
import org.bukkit.util.Vector;
import org.spongepowered.configurate.ConfigurationNode;
@@ -36,6 +37,16 @@ public class Settings {
defaultMenu = source.node(DEFAULT_MENU).getString();
configVersion = source.node(CONFIG_VERSION).getInt(0);
if (configVersion == 0) {
HMCCosmeticsPlugin plugin = HMCCosmeticsPlugin.getInstance();
plugin.getLogger().severe("");
plugin.getLogger().severe("");
plugin.getLogger().severe("Improper Configuration Found (Config Version Does Not Exist!)");
plugin.getLogger().severe("Problems will happen with the plugin! Delete and regenerate a new one!");
plugin.getLogger().severe("");
plugin.getLogger().severe("");
return;
}
ConfigurationNode cosmeticSettings = source.node(COSMETIC_SETTINGS_PATH);
@@ -48,7 +59,6 @@ public class Settings {
lookDownPitch = cosmeticSettings.node(LOOK_DOWN_PITCH_PATH).getInt();
viewDistance = cosmeticSettings.node(VIEW_DISTANCE_PATH).getInt();
final var balloonSection = cosmeticSettings.node(BALLOON_OFFSET);
if (balloonSection != null) {