Files
src
build.gradle
Code
15 769
src/main/java/com/example/simpleshop/SimpleShopGUI.java
package com.example.simpleshop;
import com.example.simpleshop.command.ShopCommand;
import com.example.simpleshop.economy.VaultEconomy;
import com.example.simpleshop.inventory.gui.GUIListener;
import com.example.simpleshop.inventory.gui.GUIManager;
import lombok.Getter;
import org.bukkit.Bukkit;
import org.bukkit.plugin.java.JavaPlugin;
@Getter
public class SimpleShopGUI extends JavaPlugin {
private GUIManager guiManager;
private VaultEconomy vaultEconomy;
@Override
public void onEnable() {
this.vaultEconomy = new VaultEconomy();
if (!this.vaultEconomy.setupEconomy(this)) {
this.getLogger().severe("Vault economy not found! Disabling plugin.");
Bukkit.getPluginManager().disablePlugin(this);
return;
}
this.guiManager = new GUIManager();
Bukkit.getPluginManager().registerEvents(new GUIListener(this.guiManager), this);
this.getCommand("shop").setExecutor(new ShopCommand(this));
this.getLogger().info("SimpleShopGUI has been enabled!");
}
@Override
public void onDisable() {
this.getLogger().info("SimpleShopGUI has been disabled!");
}
}