From 61c8ea065dbe1dab8da7d65d9043a3f76d325ac2 Mon Sep 17 00:00:00 2001 From: Jsinco Date: Tue, 27 Aug 2024 06:13:50 -0400 Subject: [PATCH] forgot i made /brew create playerOnly. oops --- src/main/java/com/dre/brewery/api/addons/AddonManager.java | 3 +-- src/main/java/com/dre/brewery/api/addons/BreweryAddon.java | 2 ++ .../com/dre/brewery/commands/subcommands/CreateCommand.java | 4 ++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/dre/brewery/api/addons/AddonManager.java b/src/main/java/com/dre/brewery/api/addons/AddonManager.java index cf98407a..82cc4892 100644 --- a/src/main/java/com/dre/brewery/api/addons/AddonManager.java +++ b/src/main/java/com/dre/brewery/api/addons/AddonManager.java @@ -13,7 +13,6 @@ import java.net.URL; import java.net.URLClassLoader; import java.util.ArrayList; -import java.util.Arrays; import java.util.Collections; import java.util.List; import java.util.concurrent.CompletionException; @@ -103,7 +102,7 @@ public void loadAddons() { addon.getAddonLogger().info("Loading &a" + addon.getAddonInfo().name() + " &f-&a v" + addon.getAddonInfo().version() + " &fby &a" + addon.getAddonInfo().author()); addons.add(addon); // Add to our list of addons - //addon.onAddonEnable(); + addon.onAddonPreEnable(); } catch (Exception e) { plugin.getLogger().log(Level.SEVERE,"Failed to load addon class " + clazz.getSimpleName(), e); } diff --git a/src/main/java/com/dre/brewery/api/addons/BreweryAddon.java b/src/main/java/com/dre/brewery/api/addons/BreweryAddon.java index efa7784b..0cd8f3c7 100644 --- a/src/main/java/com/dre/brewery/api/addons/BreweryAddon.java +++ b/src/main/java/com/dre/brewery/api/addons/BreweryAddon.java @@ -10,6 +10,8 @@ public abstract class BreweryAddon { private AddonFileManager addonFileManager = null; private AddonInfo addonInfo = null; + public void onAddonPreEnable() { + } public void onAddonEnable() { } diff --git a/src/main/java/com/dre/brewery/commands/subcommands/CreateCommand.java b/src/main/java/com/dre/brewery/commands/subcommands/CreateCommand.java index 9ad83571..37efdaed 100644 --- a/src/main/java/com/dre/brewery/commands/subcommands/CreateCommand.java +++ b/src/main/java/com/dre/brewery/commands/subcommands/CreateCommand.java @@ -26,7 +26,7 @@ public void execute(BreweryPlugin breweryPlugin, CommandSender sender, String la breweryPlugin.msg(sender, breweryPlugin.languageReader.get("Help_Create")); return; } - // Is this just a map? + Tuple brewForPlayer = CommandUtil.getFromCommand(sender, args); if (brewForPlayer != null) { @@ -55,7 +55,7 @@ public String permission() { @Override public boolean playerOnly() { - return true; + return false; }