Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 1 addition & 47 deletions src/main/java/dev/spexx/configurationAPI/ConfigurationAPI.java
Original file line number Diff line number Diff line change
@@ -1,13 +1,7 @@
package dev.spexx.configurationAPI;

import dev.spexx.configurationAPI.config.YamlConfig;
import dev.spexx.configurationAPI.difference.ConfigLineDifference;
import dev.spexx.configurationAPI.events.ConfigReloadedEvent;
import dev.spexx.configurationAPI.manager.ConfigManager;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.plugin.java.JavaPlugin;
import org.jetbrains.annotations.NotNull;

/**
* Entry point for the ConfigurationAPI plugin.
Expand All @@ -18,46 +12,6 @@
* @apiNote
* This plugin primarily serves as a runtime host for the configuration API.
*
* @implSpec
* Lifecycle methods are invoked by the Bukkit framework.
*
* @since 1.0
*/
public final class ConfigurationAPI extends JavaPlugin implements Listener {

private ConfigurationAPI() {
throw new UnsupportedOperationException();
}

@Override
public void onEnable() {

ConfigManager configManager = new ConfigManager(this);

// load test config
YamlConfig config = configManager.getOrLoadResource("config.yml");

// register event listener
getServer().getPluginManager().registerEvents(this, this);
}

@Override
public void onDisable() { }

/**
* Handles configuration reload events.
*
* @param event the reload event
*
* @since 1.0
*/
@EventHandler
public void onReload(@NotNull ConfigReloadedEvent event) {

getLogger().info("Config reloaded: " +
event.getConfig().file().getName());

getLogger().info("New value: " +
event.getConfig().config().getInt("value"));
}
}
public final class ConfigurationAPI extends JavaPlugin implements Listener {}
1 change: 0 additions & 1 deletion src/main/resources/config.yml

This file was deleted.