From 3741fffd23660ac8c913a18ecf2075e3d71a7b55 Mon Sep 17 00:00:00 2001 From: mdxd44 Date: Fri, 31 Dec 2021 04:09:11 +0900 Subject: Add floodgate support, release candidate 2. --- .../java/net/elytrium/limboauth/command/LimboAuthCommand.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/main/java/net/elytrium/limboauth/command') diff --git a/src/main/java/net/elytrium/limboauth/command/LimboAuthCommand.java b/src/main/java/net/elytrium/limboauth/command/LimboAuthCommand.java index 611b1c3..1465023 100644 --- a/src/main/java/net/elytrium/limboauth/command/LimboAuthCommand.java +++ b/src/main/java/net/elytrium/limboauth/command/LimboAuthCommand.java @@ -30,6 +30,12 @@ import net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer; public class LimboAuthCommand implements SimpleCommand { + private final LimboAuth plugin; + + public LimboAuthCommand(LimboAuth plugin) { + this.plugin = plugin; + } + @Override public List suggest(SimpleCommand.Invocation invocation) { CommandSource source = invocation.source(); @@ -57,7 +63,7 @@ public class LimboAuthCommand implements SimpleCommand { if (args.length == 1) { if (args[0].equalsIgnoreCase("reload") && source.hasPermission("limboauth.admin.reload")) { try { - LimboAuth.getInstance().reload(); + this.plugin.reload(); source.sendMessage(LegacyComponentSerializer.legacyAmpersand().deserialize(Settings.IMP.MAIN.STRINGS.RELOAD)); } catch (Exception e) { source.sendMessage(LegacyComponentSerializer.legacyAmpersand().deserialize(Settings.IMP.MAIN.STRINGS.RELOAD_FAILED)); -- cgit