From 67a2e3f1467c555281f33c307d1224a4a348abb9 Mon Sep 17 00:00:00 2001 From: Jeremy Fail Date: Sun, 26 Jan 2025 12:44:45 -0700 Subject: [PATCH] Update FactionsUUIDProtectionModule to account for admin bypass mode --- .../protection/modules/FactionsUUIDProtectionModule.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/dough-protection/src/main/java/io/github/bakedlibs/dough/protection/modules/FactionsUUIDProtectionModule.java b/dough-protection/src/main/java/io/github/bakedlibs/dough/protection/modules/FactionsUUIDProtectionModule.java index 843da62a..d2a0136a 100644 --- a/dough-protection/src/main/java/io/github/bakedlibs/dough/protection/modules/FactionsUUIDProtectionModule.java +++ b/dough-protection/src/main/java/io/github/bakedlibs/dough/protection/modules/FactionsUUIDProtectionModule.java @@ -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; @@ -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()); } }