diff --git a/src/DaPigGuy/PiggyFactions/commands/subcommands/TopSubCommand.php b/src/DaPigGuy/PiggyFactions/commands/subcommands/TopSubCommand.php index 386d4c6d..d6949e0d 100644 --- a/src/DaPigGuy/PiggyFactions/commands/subcommands/TopSubCommand.php +++ b/src/DaPigGuy/PiggyFactions/commands/subcommands/TopSubCommand.php @@ -32,14 +32,13 @@ public function onBasicRun(CommandSender $sender, array $args): void return (int)($b->getPower() - $a->getPower()); } ]; - $type = $args["type"] ?? "power"; - if (!isset($types[$type])) return; - if ($this->plugin->isFactionBankEnabled()) { $types["money"] = function (Faction $a, Faction $b): int { return (int)($b->getMoney() - $a->getMoney()); }; } + $type = $args["type"] ?? "power"; + if (!isset($types[$type])) return; $factions = array_filter($this->plugin->getFactionsManager()->getFactions(), function (Faction $faction): bool { return !$faction->getFlag(Flag::SAFEZONE) && !$faction->getFlag(Flag::WARZONE);