Skip to content

Commit

Permalink
moved authlogin to bukkit
Browse files Browse the repository at this point in the history
  • Loading branch information
poyrazinan committed Oct 12, 2023
1 parent 5e37147 commit 29cee5c
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 53 deletions.
7 changes: 1 addition & 6 deletions bukkit/src/main/java/net/leaderos/plugin/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
import dev.triumphteam.cmd.core.message.MessageKey;
import lombok.Getter;
import net.leaderos.plugin.api.LeaderOSAPI;
import net.leaderos.plugin.handlers.ModuleEvents;
import net.leaderos.plugin.modules.credit.Credit;
import net.leaderos.plugin.modules.voucher.Voucher;
import net.leaderos.shared.Shared;
Expand All @@ -15,8 +14,7 @@
import net.leaderos.plugin.modules.webstore.WebStore;
import net.leaderos.shared.configuration.Data;
import net.leaderos.shared.helpers.ChatUtil;
import net.leaderos.shared.module.auth.AuthLogin;
import org.bukkit.Bukkit;
import net.leaderos.plugin.modules.auth.AuthLogin;
import org.bukkit.command.CommandSender;
import org.bukkit.plugin.java.JavaPlugin;

Expand Down Expand Up @@ -67,9 +65,6 @@ public void onEnable() {
commandManager = BukkitCommandManager.create(this);
setupCommands();
(voucherData = new Data("voucher_data.yml")).create();

// Loads module events
Bukkit.getPluginManager().registerEvents(new ModuleEvents(), Main.getInstance());
// Loads modules
LeaderOSAPI.getModuleManager().registerModule(new AuthLogin());
LeaderOSAPI.getModuleManager().registerModule(new Cache());
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package net.leaderos.shared.module.auth;
package net.leaderos.plugin.modules.auth;

import net.leaderos.plugin.Main;
import net.leaderos.plugin.modules.auth.commands.Commands;
import net.leaderos.shared.Shared;
import net.leaderos.shared.helpers.ChatUtil;
import net.leaderos.shared.helpers.MDChat.MDChatAPI;
Expand All @@ -24,12 +26,16 @@ public class AuthLogin extends LeaderOSModule {
/**
* onEnable method of module
*/
public void onEnable() {}
public void onEnable() {
Main.getCommandManager().registerCommand(new Commands());
}

/**
* onDisable method of module
*/
public void onDisable() {}
public void onDisable() {
Main.getCommandManager().unregisterCommand(new Commands());
}


/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package net.leaderos.shared.module.auth.commands;
package net.leaderos.plugin.modules.auth.commands;

import dev.triumphteam.cmd.bukkit.annotation.Permission;
import dev.triumphteam.cmd.core.BaseCommand;
import dev.triumphteam.cmd.core.annotation.Command;
import dev.triumphteam.cmd.core.annotation.Default;
import lombok.RequiredArgsConstructor;
import net.leaderos.shared.module.auth.AuthLogin;
import net.leaderos.plugin.modules.auth.AuthLogin;
import org.bukkit.entity.Player;

/**
Expand All @@ -15,7 +15,7 @@
*/
@RequiredArgsConstructor
@Command(value = "auth", alias = {"authy", "kayit", "site", "web"})
public class AuthCommand extends BaseCommand {
public class Commands extends BaseCommand {

/**
* Default command of auth
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import net.leaderos.plugin.modules.webstore.model.Product;
import net.leaderos.shared.helpers.ChatUtil;
import net.leaderos.plugin.helpers.GuiHelper;
import net.leaderos.shared.module.auth.AuthLogin;
import net.leaderos.plugin.modules.auth.AuthLogin;
import org.bukkit.entity.Player;

import java.util.ArrayList;
Expand Down

0 comments on commit 29cee5c

Please sign in to comment.