Skip to content

Commit

Permalink
claim: fix single unclaim bypassing blacklist
Browse files Browse the repository at this point in the history
  • Loading branch information
Aericio committed Jul 16, 2023
1 parent 08d518c commit c476848
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ class UnclaimSubCommand extends FactionSubCommand
{
public function onNormalRun(Player $sender, ?Faction $faction, FactionsPlayer $member, string $aliasUsed, array $args): void
{
if (in_array($sender->getWorld()->getFolderName(), $this->plugin->getConfig()->getNested("factions.claims.blacklisted-worlds"))) {
$member->sendMessage("commands.claim.blacklisted-world");
return;
}
$claim = $this->plugin->getClaimsManager()->getClaimByPosition($sender->getPosition());
if ($claim === null) {
$member->sendMessage("commands.unclaim.not-claimed");
Expand Down

0 comments on commit c476848

Please sign in to comment.