File tree Expand file tree Collapse file tree 3 files changed +15
-5
lines changed
src/main/java/me/ryanhamshire/GriefPrevention Expand file tree Collapse file tree 3 files changed +15
-5
lines changed Original file line number Diff line number Diff line change @@ -81,4 +81,7 @@ target/
8181
8282# Java Pack
8383java-pack.manifest.json
84- redhat-java.vsix
84+ redhat-java.vsix
85+
86+ # Other
87+ .factorypath
Original file line number Diff line number Diff line change 88
99 <groupId >com.griefprevention</groupId >
1010 <artifactId >GriefPrevention</artifactId >
11- <version >17.1.7 </version >
11+ <version >17.1.8 </version >
1212
1313 <name >GriefPrevention</name >
1414 <description >The official self-service anti-griefing Bukkit plugin for Minecraft servers since 2011.</description >
Original file line number Diff line number Diff line change @@ -43,7 +43,13 @@ public enum ClaimPermission
4343 * ClaimPermission that allows users to grant ClaimPermissions. Uses a separate track from normal
4444 * permissions and does not grant any other permissions.
4545 */
46- Manage (Messages .NoPermissionTrust );
46+ Manage (Messages .NoPermissionTrust ),
47+
48+ /**
49+ * @deprecated Use {@link #Container} instead. This alias exists for backward compatibility only.
50+ */
51+ @ Deprecated (forRemoval = true )
52+ Inventory (Messages .NoContainersPermission );
4753
4854 private final Messages denialMessage ;
4955
@@ -69,8 +75,9 @@ public Messages getDenialMessage()
6975 public boolean isGrantedBy (ClaimPermission other )
7076 {
7177 if (other == Manage || this == Manage ) return other == this || other == Edit ;
72- // This uses declaration order to compare! If trust levels are reordered this method must be rewritten.
73- return other != null && other .ordinal () <= this .ordinal ();
78+ ClaimPermission thisNormalized = this == Inventory ? Container : this ;
79+ ClaimPermission otherNormalized = other == Inventory ? Container : other ;
80+ return otherNormalized != null && otherNormalized .ordinal () <= thisNormalized .ordinal ();
7481 }
7582
7683}
You can’t perform that action at this time.
0 commit comments