@@ -65,6 +65,14 @@ public interface PermsManager
6565 */
6666 boolean canInvite (final UUID playerUUID , final Faction playerFaction );
6767
68+ /**
69+ * Checks if a player with the given UUID has permission for opening faction's chest.
70+ * @param playerUUID the UUID of the player.
71+ * @param playerFaction player's faction.
72+ * @return <tt>true</tt> if player can open faction's chest, <tt>false</tt> if not.
73+ */
74+ boolean canUseChest (final UUID playerUUID , final Faction playerFaction );
75+
6876 static Map <FactionMemberType , Map <FactionPermType , Boolean >> getDefaultFactionPerms ()
6977 {
7078 Map <FactionMemberType , Map <FactionPermType , Boolean >> map = new LinkedHashMap <>();
@@ -80,20 +88,23 @@ static Map<FactionMemberType, Map<FactionPermType, Boolean>> getDefaultFactionPe
8088 officerMap .put (FactionPermType .CLAIM , true );
8189 officerMap .put (FactionPermType .ATTACK , true );
8290 officerMap .put (FactionPermType .INVITE , true );
91+ officerMap .put (FactionPermType .CHEST , true );
8392
8493 membersMap .put (FactionPermType .USE , true );
8594 membersMap .put (FactionPermType .PLACE , true );
8695 membersMap .put (FactionPermType .DESTROY , true );
8796 membersMap .put (FactionPermType .CLAIM , false );
8897 membersMap .put (FactionPermType .ATTACK , false );
8998 membersMap .put (FactionPermType .INVITE , true );
99+ membersMap .put (FactionPermType .CHEST , true );
90100
91101 recruitsMap .put (FactionPermType .USE , true );
92102 recruitsMap .put (FactionPermType .PLACE , true );
93103 recruitsMap .put (FactionPermType .DESTROY , true );
94104 recruitsMap .put (FactionPermType .CLAIM , false );
95105 recruitsMap .put (FactionPermType .ATTACK , false );
96106 recruitsMap .put (FactionPermType .INVITE , false );
107+ recruitsMap .put (FactionPermType .CHEST , false );
97108
98109 truceMap .put (FactionPermType .USE , true );
99110 truceMap .put (FactionPermType .PLACE , false );
0 commit comments