From 8add90730f2f9f7037348e9228f8a2640dd3476a Mon Sep 17 00:00:00 2001 From: Sefiraat Date: Sat, 18 Jun 2022 19:43:52 +0100 Subject: [PATCH 1/6] Commands + Sonar --- pom.xml | 11 +++- .../sefiraat/netheopoiesis/Netheopoiesis.java | 5 +- .../dev/sefiraat/netheopoiesis/Registry.java | 4 -- .../commands/NetheoCommands.java | 66 +++++++++++++++++++ .../groups/TradesFlexGroup.java | 3 - .../listeners/ManagedMobListener.java | 3 - .../managers/DispatchManager.java | 31 +++++++++ .../netheopoiesis/managers/MobManager.java | 2 +- src/main/resources/gitbook-template.md | 14 +++- 9 files changed, 125 insertions(+), 14 deletions(-) create mode 100644 src/main/java/dev/sefiraat/netheopoiesis/implementation/commands/NetheoCommands.java create mode 100644 src/main/java/dev/sefiraat/netheopoiesis/managers/DispatchManager.java diff --git a/pom.xml b/pom.xml index a61eccf..fc8f3b2 100644 --- a/pom.xml +++ b/pom.xml @@ -108,6 +108,10 @@ papermc https://papermc.io/repo/repository/maven-public/ + + aikar + https://repo.aikar.co/content/groups/aikar/ + @@ -152,9 +156,14 @@ org.jetbrains annotations - RELEASE + 23.0.0 compile + + co.aikar + acf-paper + 0.5.1-SNAPSHOT + diff --git a/src/main/java/dev/sefiraat/netheopoiesis/Netheopoiesis.java b/src/main/java/dev/sefiraat/netheopoiesis/Netheopoiesis.java index 930890b..75f7ae9 100644 --- a/src/main/java/dev/sefiraat/netheopoiesis/Netheopoiesis.java +++ b/src/main/java/dev/sefiraat/netheopoiesis/Netheopoiesis.java @@ -3,10 +3,11 @@ import dev.sefiraat.netheopoiesis.api.plant.netheos.NetheoBalls; import dev.sefiraat.netheopoiesis.implementation.Items; import dev.sefiraat.netheopoiesis.managers.ConfigManager; +import dev.sefiraat.netheopoiesis.managers.DispatchManager; import dev.sefiraat.netheopoiesis.managers.ListenerManager; import dev.sefiraat.netheopoiesis.managers.MobManager; -import dev.sefiraat.netheopoiesis.managers.TaskManager; import dev.sefiraat.netheopoiesis.managers.SupportedPluginManager; +import dev.sefiraat.netheopoiesis.managers.TaskManager; import io.github.thebusybiscuit.slimefun4.api.SlimefunAddon; import io.github.thebusybiscuit.slimefun4.libraries.dough.updater.GitHubBuildsUpdater; import org.bstats.bukkit.Metrics; @@ -34,6 +35,7 @@ public class Netheopoiesis extends JavaPlugin implements SlimefunAddon { private ListenerManager listenerManager; private TaskManager taskManager; private MobManager mobManager; + private DispatchManager dispatchManager; private Purification purification; private Registry registry; @@ -59,6 +61,7 @@ public void onEnable() { this.listenerManager = new ListenerManager(); this.taskManager = new TaskManager(); this.mobManager = new MobManager(); + this.dispatchManager = new DispatchManager(this); this.purification = new Purification(); this.registry = new Registry(); diff --git a/src/main/java/dev/sefiraat/netheopoiesis/Registry.java b/src/main/java/dev/sefiraat/netheopoiesis/Registry.java index 1cef7c3..31d2565 100644 --- a/src/main/java/dev/sefiraat/netheopoiesis/Registry.java +++ b/src/main/java/dev/sefiraat/netheopoiesis/Registry.java @@ -14,7 +14,6 @@ import dev.sefiraat.netheopoiesis.api.plant.netheos.Trade; import dev.sefiraat.netheopoiesis.utils.TextUtils; import org.bukkit.ChatColor; -import org.bukkit.entity.Piglin; import org.bukkit.inventory.ItemStack; import javax.annotation.Nonnull; @@ -25,11 +24,8 @@ import java.text.DecimalFormat; import java.util.ArrayList; import java.util.Collections; -import java.util.HashSet; import java.util.List; import java.util.Locale; -import java.util.Set; -import java.util.UUID; public class Registry { diff --git a/src/main/java/dev/sefiraat/netheopoiesis/implementation/commands/NetheoCommands.java b/src/main/java/dev/sefiraat/netheopoiesis/implementation/commands/NetheoCommands.java new file mode 100644 index 0000000..ad3cf4f --- /dev/null +++ b/src/main/java/dev/sefiraat/netheopoiesis/implementation/commands/NetheoCommands.java @@ -0,0 +1,66 @@ +package dev.sefiraat.netheopoiesis.implementation.commands; + +import co.aikar.commands.BaseCommand; +import co.aikar.commands.annotation.CommandAlias; +import co.aikar.commands.annotation.CommandCompletion; +import co.aikar.commands.annotation.Default; +import co.aikar.commands.annotation.Description; +import co.aikar.commands.annotation.Subcommand; +import dev.sefiraat.netheopoiesis.api.mobs.MobCap; +import dev.sefiraat.netheopoiesis.api.mobs.MobCapType; +import dev.sefiraat.netheopoiesis.managers.MobManager; +import dev.sefiraat.netheopoiesis.utils.TextUtils; +import dev.sefiraat.netheopoiesis.utils.Theme; +import org.bukkit.command.CommandSender; +import org.bukkit.entity.Player; + +@CommandAlias("netheopoiesis|netheo") +public class NetheoCommands extends BaseCommand { + + @Default + public void onDefault(CommandSender sender) { + if (sender instanceof Player) { + sender.sendMessage(Theme.ERROR + "Please provide a valid subcommand."); + } + } + + @Subcommand("MobCaps") + @Description("Displays information about the various MobCaps") + public void viewMobCaps(CommandSender sender) { + if (sender instanceof Player player) { + String[] messages = new String[MobCapType.values().length]; + for (int i = 0; i < MobCapType.values().length; i++) { + final MobCapType type = MobCapType.values()[i]; + final MobCap mobCap = MobManager.getInstance().getMobCap(type); + messages[i] = Theme.CLICK_INFO.apply( + TextUtils.toTitleCase(type.name()) + ": " + mobCap.count() + "/" + mobCap.getMaxAmount() + ); + } + player.sendMessage(messages); + } + } + + @Subcommand("PurgeMobCap") + @Description("Kills all mobs from a specific Mob Cap") + @CommandCompletion("@MOB_CAPS") + public void purgeMobCap(CommandSender sender, String mobCapType) { + if (sender instanceof Player player) { + final MobCap cap = MobManager.getInstance().getMobCap(MobCapType.valueOf(mobCapType)); + cap.killAllMobs(); + player.sendMessage(Theme.SUCCESS.apply("Mob Cap Purged")); + } + } + + @Subcommand("PurgeAllMobCap") + @Description("Kills all mobs from all Mob Caps") + public void purgeMobCap(CommandSender sender) { + if (sender instanceof Player player) { + for (MobCapType type : MobCapType.values()) { + MobManager.getInstance().getMobCap(type).killAllMobs(); + } + player.sendMessage(Theme.SUCCESS.apply("All Mob Caps Purged")); + } + } + +} + diff --git a/src/main/java/dev/sefiraat/netheopoiesis/implementation/groups/TradesFlexGroup.java b/src/main/java/dev/sefiraat/netheopoiesis/implementation/groups/TradesFlexGroup.java index 55a2f82..1869887 100644 --- a/src/main/java/dev/sefiraat/netheopoiesis/implementation/groups/TradesFlexGroup.java +++ b/src/main/java/dev/sefiraat/netheopoiesis/implementation/groups/TradesFlexGroup.java @@ -1,7 +1,6 @@ package dev.sefiraat.netheopoiesis.implementation.groups; import dev.sefiraat.netheopoiesis.Registry; -import dev.sefiraat.netheopoiesis.api.items.NetherSeed; import dev.sefiraat.netheopoiesis.api.plant.netheos.Trade; import dev.sefiraat.netheopoiesis.implementation.Groups; import dev.sefiraat.netheopoiesis.utils.StatisticUtils; @@ -19,9 +18,7 @@ import org.bukkit.entity.Player; import org.bukkit.inventory.ItemStack; -import javax.annotation.Nonnull; import javax.annotation.ParametersAreNonnullByDefault; -import java.text.DecimalFormat; import java.util.ArrayList; import java.util.List; diff --git a/src/main/java/dev/sefiraat/netheopoiesis/listeners/ManagedMobListener.java b/src/main/java/dev/sefiraat/netheopoiesis/listeners/ManagedMobListener.java index be441eb..dc98094 100644 --- a/src/main/java/dev/sefiraat/netheopoiesis/listeners/ManagedMobListener.java +++ b/src/main/java/dev/sefiraat/netheopoiesis/listeners/ManagedMobListener.java @@ -1,15 +1,12 @@ package dev.sefiraat.netheopoiesis.listeners; import dev.sefiraat.netheopoiesis.managers.MobManager; -import dev.sefiraat.netheopoiesis.utils.Keys; -import io.github.thebusybiscuit.slimefun4.libraries.dough.data.persistent.PersistentDataAPI; import org.bukkit.Material; import org.bukkit.entity.Entity; import org.bukkit.entity.LivingEntity; import org.bukkit.event.EventHandler; import org.bukkit.event.Listener; import org.bukkit.event.entity.EntityDeathEvent; -import org.bukkit.event.player.PlayerDropItemEvent; import org.bukkit.event.player.PlayerInteractEntityEvent; import org.bukkit.event.world.ChunkUnloadEvent; import org.bukkit.inventory.ItemStack; diff --git a/src/main/java/dev/sefiraat/netheopoiesis/managers/DispatchManager.java b/src/main/java/dev/sefiraat/netheopoiesis/managers/DispatchManager.java new file mode 100644 index 0000000..b006826 --- /dev/null +++ b/src/main/java/dev/sefiraat/netheopoiesis/managers/DispatchManager.java @@ -0,0 +1,31 @@ +package dev.sefiraat.netheopoiesis.managers; + +import co.aikar.commands.PaperCommandManager; +import com.google.common.base.Preconditions; +import dev.sefiraat.netheopoiesis.api.mobs.MobCapType; +import dev.sefiraat.netheopoiesis.implementation.commands.NetheoCommands; +import org.bukkit.plugin.Plugin; + +import java.util.Arrays; +import java.util.stream.Collectors; + +public final class DispatchManager extends PaperCommandManager { + + private static DispatchManager instance; + + public DispatchManager(Plugin plugin) { + super(plugin); + + Preconditions.checkArgument(instance == null, "Cannot create a new instance of the DispatchManager"); + instance = this; + + registerCommand(new NetheoCommands()); + + getCommandCompletions().registerCompletion( + "MOB_CAPS", + context -> Arrays.stream(MobCapType.values()) + .map(Enum::name) + .collect(Collectors.toSet()) + ); + } +} diff --git a/src/main/java/dev/sefiraat/netheopoiesis/managers/MobManager.java b/src/main/java/dev/sefiraat/netheopoiesis/managers/MobManager.java index d50f8de..adef2a0 100644 --- a/src/main/java/dev/sefiraat/netheopoiesis/managers/MobManager.java +++ b/src/main/java/dev/sefiraat/netheopoiesis/managers/MobManager.java @@ -176,7 +176,7 @@ public void addMob(@Nonnull MobCapType type, @Nonnull LivingEntity livingEntity) * * @param type The {@link MobCapType} to add the mob to * @param livingEntity The {@link LivingEntity} being added - * @param bypassCap True if the mob should be added regardless of a cap + * @param bypassCap True if the mob should be added regardless of a cap */ public void addMob(@Nonnull MobCapType type, @Nonnull LivingEntity livingEntity, boolean bypassCap) { addMob(type, livingEntity.getUniqueId(), bypassCap); diff --git a/src/main/resources/gitbook-template.md b/src/main/resources/gitbook-template.md index ca8d69c..ffec31e 100644 --- a/src/main/resources/gitbook-template.md +++ b/src/main/resources/gitbook-template.md @@ -22,4 +22,16 @@ Every Slimefun Tick, this plant has a {GROWTH_RATE_PERCENTAGE}% chance to grow a ### Purification Value -When placed in the Nether, this plant will add {PURIFICATION_VALUE} to the nearby purification value. \ No newline at end of file +When placed in the Nether, this plant will add {PURIFICATION_VALUE} to the nearby purification value. + +### Flavour Profile + +Each seed can be ground into a paste + +| Flavour | Flavour Strength | +|---------|------------------| +| Sweet | {FLAVOUR_SWEET} | +| Sour | {FLAVOUR_SOUR} | +| Salty | {FLAVOUR_SALTY} | +| Bitter | {FLAVOUR_BITTER} | +| Umami | {FLAVOUR_UMAMI} | \ No newline at end of file From 39e7443bb4b196081dcc29dc9a1df538863f0305 Mon Sep 17 00:00:00 2001 From: Sefiraat Date: Sat, 18 Jun 2022 20:03:57 +0100 Subject: [PATCH 2/6] Sort permissions --- .../implementation/commands/NetheoCommands.java | 4 ++++ src/main/resources/plugin.yml | 16 +++++++++++++++- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/src/main/java/dev/sefiraat/netheopoiesis/implementation/commands/NetheoCommands.java b/src/main/java/dev/sefiraat/netheopoiesis/implementation/commands/NetheoCommands.java index ad3cf4f..705d7ec 100644 --- a/src/main/java/dev/sefiraat/netheopoiesis/implementation/commands/NetheoCommands.java +++ b/src/main/java/dev/sefiraat/netheopoiesis/implementation/commands/NetheoCommands.java @@ -3,6 +3,7 @@ import co.aikar.commands.BaseCommand; import co.aikar.commands.annotation.CommandAlias; import co.aikar.commands.annotation.CommandCompletion; +import co.aikar.commands.annotation.CommandPermission; import co.aikar.commands.annotation.Default; import co.aikar.commands.annotation.Description; import co.aikar.commands.annotation.Subcommand; @@ -26,6 +27,7 @@ public void onDefault(CommandSender sender) { @Subcommand("MobCaps") @Description("Displays information about the various MobCaps") + @CommandPermission("netheopoiesis.admin.mobcaps") public void viewMobCaps(CommandSender sender) { if (sender instanceof Player player) { String[] messages = new String[MobCapType.values().length]; @@ -42,6 +44,7 @@ public void viewMobCaps(CommandSender sender) { @Subcommand("PurgeMobCap") @Description("Kills all mobs from a specific Mob Cap") + @CommandPermission("netheopoiesis.admin.mobcaps") @CommandCompletion("@MOB_CAPS") public void purgeMobCap(CommandSender sender, String mobCapType) { if (sender instanceof Player player) { @@ -53,6 +56,7 @@ public void purgeMobCap(CommandSender sender, String mobCapType) { @Subcommand("PurgeAllMobCap") @Description("Kills all mobs from all Mob Caps") + @CommandPermission("netheopoiesis.admin.mobcaps") public void purgeMobCap(CommandSender sender) { if (sender instanceof Player player) { for (MobCapType type : MobCapType.values()) { diff --git a/src/main/resources/plugin.yml b/src/main/resources/plugin.yml index f74f506..ba0f565 100644 --- a/src/main/resources/plugin.yml +++ b/src/main/resources/plugin.yml @@ -10,4 +10,18 @@ depend: commands: netheopoiesis: description: /netheopoiesis - usage: /netheopoiesis \ No newline at end of file + usage: /netheopoiesis +permissions: + netheopoiesis.*: + description: Provides permissions for all Netheo functions + default: op + children: + netheopoiesis.admin: true + netheopoiesis.admin: + description: Provides access to all Netheo admin functions + default: op + children: + netheopoiesis.admin.mobcaps: true + netheopoiesis.admin.mobcaps: + description: Allows the user to see and manage Nethero MobCaps + default: op \ No newline at end of file From f644ccc7b7124d461783b26c44b3cb3da98e853e Mon Sep 17 00:00:00 2001 From: Sefiraat Date: Sat, 18 Jun 2022 20:19:04 +0100 Subject: [PATCH 3/6] Allow console --- .../commands/NetheoCommands.java | 46 +++++++++++++------ 1 file changed, 31 insertions(+), 15 deletions(-) diff --git a/src/main/java/dev/sefiraat/netheopoiesis/implementation/commands/NetheoCommands.java b/src/main/java/dev/sefiraat/netheopoiesis/implementation/commands/NetheoCommands.java index 705d7ec..ca1e5bf 100644 --- a/src/main/java/dev/sefiraat/netheopoiesis/implementation/commands/NetheoCommands.java +++ b/src/main/java/dev/sefiraat/netheopoiesis/implementation/commands/NetheoCommands.java @@ -7,6 +7,7 @@ import co.aikar.commands.annotation.Default; import co.aikar.commands.annotation.Description; import co.aikar.commands.annotation.Subcommand; +import dev.sefiraat.netheopoiesis.Netheopoiesis; import dev.sefiraat.netheopoiesis.api.mobs.MobCap; import dev.sefiraat.netheopoiesis.api.mobs.MobCapType; import dev.sefiraat.netheopoiesis.managers.MobManager; @@ -29,16 +30,22 @@ public void onDefault(CommandSender sender) { @Description("Displays information about the various MobCaps") @CommandPermission("netheopoiesis.admin.mobcaps") public void viewMobCaps(CommandSender sender) { + final String[] messages = new String[MobCapType.values().length]; + + for (int i = 0; i < MobCapType.values().length; i++) { + final MobCapType type = MobCapType.values()[i]; + final MobCap mobCap = MobManager.getInstance().getMobCap(type); + messages[i] = TextUtils.toTitleCase(type.name()) + ": " + mobCap.count() + "/" + mobCap.getMaxAmount(); + } + if (sender instanceof Player player) { - String[] messages = new String[MobCapType.values().length]; - for (int i = 0; i < MobCapType.values().length; i++) { - final MobCapType type = MobCapType.values()[i]; - final MobCap mobCap = MobManager.getInstance().getMobCap(type); - messages[i] = Theme.CLICK_INFO.apply( - TextUtils.toTitleCase(type.name()) + ": " + mobCap.count() + "/" + mobCap.getMaxAmount() - ); + for (String message : messages) { + player.sendMessage(Theme.CLICK_INFO.apply(message)); + } + } else { + for (String message : messages) { + Netheopoiesis.logInfo(message); } - player.sendMessage(messages); } } @@ -47,10 +54,14 @@ public void viewMobCaps(CommandSender sender) { @CommandPermission("netheopoiesis.admin.mobcaps") @CommandCompletion("@MOB_CAPS") public void purgeMobCap(CommandSender sender, String mobCapType) { + final MobCap cap = MobManager.getInstance().getMobCap(MobCapType.valueOf(mobCapType)); + final String message = "Mob Cap Purged"; + + cap.killAllMobs(); if (sender instanceof Player player) { - final MobCap cap = MobManager.getInstance().getMobCap(MobCapType.valueOf(mobCapType)); - cap.killAllMobs(); - player.sendMessage(Theme.SUCCESS.apply("Mob Cap Purged")); + player.sendMessage(Theme.SUCCESS.apply(message)); + } else { + Netheopoiesis.logInfo(message); } } @@ -58,11 +69,16 @@ public void purgeMobCap(CommandSender sender, String mobCapType) { @Description("Kills all mobs from all Mob Caps") @CommandPermission("netheopoiesis.admin.mobcaps") public void purgeMobCap(CommandSender sender) { + final String message = "All Mob Caps Purged"; + + for (MobCapType type : MobCapType.values()) { + MobManager.getInstance().getMobCap(type).killAllMobs(); + } + if (sender instanceof Player player) { - for (MobCapType type : MobCapType.values()) { - MobManager.getInstance().getMobCap(type).killAllMobs(); - } - player.sendMessage(Theme.SUCCESS.apply("All Mob Caps Purged")); + player.sendMessage(Theme.SUCCESS.apply(message)); + } else { + Netheopoiesis.logInfo(message); } } From d78082006abe673285a86d6d1df23e9e2c24a81b Mon Sep 17 00:00:00 2001 From: Sefiraat Date: Sat, 18 Jun 2022 21:42:48 +0100 Subject: [PATCH 4/6] Update src/main/java/dev/sefiraat/netheopoiesis/implementation/commands/NetheoCommands.java Co-authored-by: J3fftw <44972470+J3fftw1@users.noreply.github.com> --- .../netheopoiesis/implementation/commands/NetheoCommands.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/dev/sefiraat/netheopoiesis/implementation/commands/NetheoCommands.java b/src/main/java/dev/sefiraat/netheopoiesis/implementation/commands/NetheoCommands.java index ca1e5bf..afff3d4 100644 --- a/src/main/java/dev/sefiraat/netheopoiesis/implementation/commands/NetheoCommands.java +++ b/src/main/java/dev/sefiraat/netheopoiesis/implementation/commands/NetheoCommands.java @@ -54,10 +54,10 @@ public void viewMobCaps(CommandSender sender) { @CommandPermission("netheopoiesis.admin.mobcaps") @CommandCompletion("@MOB_CAPS") public void purgeMobCap(CommandSender sender, String mobCapType) { - final MobCap cap = MobManager.getInstance().getMobCap(MobCapType.valueOf(mobCapType)); + final MobCap mobCap = MobManager.getInstance().getMobCap(MobCapType.valueOf(mobCapType)); final String message = "Mob Cap Purged"; - cap.killAllMobs(); + mobCap.killAllMobs(); if (sender instanceof Player player) { player.sendMessage(Theme.SUCCESS.apply(message)); } else { From 529f8ecc8f70d6c16dc740ec2bf323aa6b60b550 Mon Sep 17 00:00:00 2001 From: Sefiraat Date: Sat, 18 Jun 2022 21:47:15 +0100 Subject: [PATCH 5/6] Feedback --- .../commands/NetheoCommands.java | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/src/main/java/dev/sefiraat/netheopoiesis/implementation/commands/NetheoCommands.java b/src/main/java/dev/sefiraat/netheopoiesis/implementation/commands/NetheoCommands.java index ca1e5bf..4ce9017 100644 --- a/src/main/java/dev/sefiraat/netheopoiesis/implementation/commands/NetheoCommands.java +++ b/src/main/java/dev/sefiraat/netheopoiesis/implementation/commands/NetheoCommands.java @@ -21,29 +21,26 @@ public class NetheoCommands extends BaseCommand { @Default public void onDefault(CommandSender sender) { - if (sender instanceof Player) { - sender.sendMessage(Theme.ERROR + "Please provide a valid subcommand."); - } + sender.sendMessage(Theme.ERROR + "Please provide a valid subcommand."); } @Subcommand("MobCaps") @Description("Displays information about the various MobCaps") @CommandPermission("netheopoiesis.admin.mobcaps") public void viewMobCaps(CommandSender sender) { - final String[] messages = new String[MobCapType.values().length]; + final MobCapType[] mobCapTypes = MobCapType.values(); + final String[] messages = new String[mobCapTypes.length]; - for (int i = 0; i < MobCapType.values().length; i++) { - final MobCapType type = MobCapType.values()[i]; + for (int i = 0; i < mobCapTypes.length; i++) { + final MobCapType type = mobCapTypes[i]; final MobCap mobCap = MobManager.getInstance().getMobCap(type); messages[i] = TextUtils.toTitleCase(type.name()) + ": " + mobCap.count() + "/" + mobCap.getMaxAmount(); } - if (sender instanceof Player player) { - for (String message : messages) { + for (String message : messages) { + if (sender instanceof Player player) { player.sendMessage(Theme.CLICK_INFO.apply(message)); - } - } else { - for (String message : messages) { + } else { Netheopoiesis.logInfo(message); } } From 072c61ce2b3198ca3b6c3ff4cdfc8df387ca1f1b Mon Sep 17 00:00:00 2001 From: Sefiraat Date: Sat, 18 Jun 2022 21:50:35 +0100 Subject: [PATCH 6/6] Annoying --- .../netheopoiesis/implementation/commands/NetheoCommands.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/dev/sefiraat/netheopoiesis/implementation/commands/NetheoCommands.java b/src/main/java/dev/sefiraat/netheopoiesis/implementation/commands/NetheoCommands.java index d4cc1da..c60210a 100644 --- a/src/main/java/dev/sefiraat/netheopoiesis/implementation/commands/NetheoCommands.java +++ b/src/main/java/dev/sefiraat/netheopoiesis/implementation/commands/NetheoCommands.java @@ -54,7 +54,7 @@ public void purgeMobCap(CommandSender sender, String mobCapType) { final MobCap mobCap = MobManager.getInstance().getMobCap(MobCapType.valueOf(mobCapType)); final String message = "Mob Cap Purged"; - mobCap.killAllMobs(); + mobCap.killAllMobs(); if (sender instanceof Player player) { player.sendMessage(Theme.SUCCESS.apply(message)); } else {