Skip to content

Commit

Permalink
Update FactionsUUIDProtectionModule to account for admin bypass mode
Browse files Browse the repository at this point in the history
  • Loading branch information
JeremyFail authored Jan 26, 2025
1 parent cb22e71 commit 67a2e3f
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

import com.massivecraft.factions.Board;
import com.massivecraft.factions.FLocation;
import com.massivecraft.factions.FPlayer;
import com.massivecraft.factions.FPlayers;
import com.massivecraft.factions.Faction;

Expand Down Expand Up @@ -40,7 +41,11 @@ public boolean hasPermission(OfflinePlayer p, Location l, Interaction action) {
if (faction == null || faction.getId().equals("0")) {
return true;
} else {
return faction.getId().equals(api.getByOfflinePlayer(p).getFaction().getId());
FPlayer player = api.getByOfflinePlayer(p);
if (player.isAdminBypassing()) {
return true;
}
return faction.getId().equals(player.getFaction().getId());
}
}

Expand Down

0 comments on commit 67a2e3f

Please sign in to comment.