Revisions for ⁨Main⁩

View the changes made to this paste.

unlisted ⁨1⁩ ⁨file⁩ 2021-07-10 08:59:10 UTC

pastefile1

@@ -0,0 +1,34 @@

+package it.midnighthouse.pgui;
+
+import it.midnighthouse.pgui.commands.GUICMD;
+import it.midnighthouse.pgui.events.ClickEvent;
+import it.midnighthouse.pgui.files.BansGroup;
+import org.bukkit.plugin.java.JavaPlugin;
+
+public final class Pgui extends JavaPlugin {
+
+    @Override
+    public void onEnable() {
+
+        getCommand("pgui").setExecutor(new GUICMD());
+        getServer().getPluginManager().registerEvents(new ClickEvent(), this);
+
+        //Setup config
+
+        getConfig().options().copyDefaults();
+        saveDefaultConfig();
+
+        BansGroup.SetUp();
+        BansGroup.get().addDefault("test", "test");
+        BansGroup.get().options().copyDefaults(true);
+        BansGroup.save();
+
+        System.out.println("[PunishMenu] has loaded correctly");
+
+    }
+
+    @Override
+    public void onDisable() {
+        // Plugin shutdown logic
+    }
+}