@@ -919,6 +919,10 @@ private static PermissableAction GetPermissionFromUsableBlock(Block block) {
919
919
return GetPermissionFromUsableBlock (block .getType ());
920
920
}
921
921
private static PermissableAction GetPermissionFromUsableBlock (Material material ) {
922
+ // Check for doors that might have diff material name in old version.
923
+ if (material .name ().contains ("DOOR" ))
924
+ return PermissableAction .DOOR ;
925
+ if (material .name ().toUpperCase ().contains ("BUTTON" ) || material .name ().toUpperCase ().contains ("PRESSURE" )) return PermissableAction .BUTTON ;
922
926
if (SavageFactions .plugin .mc113 ) {
923
927
switch (material ) {
924
928
case LEVER :
@@ -993,10 +997,6 @@ private static PermissableAction GetPermissionFromUsableBlock(Material material)
993
997
case DAMAGED_ANVIL :
994
998
return PermissableAction .CONTAINER ;
995
999
default :
996
- // Check for doors that might have diff material name in old version.
997
- if (material .name ().contains ("DOOR" ))
998
- return PermissableAction .DOOR ;
999
- if (material .name ().toUpperCase ().contains ("BUTTON" ) || material .name ().toUpperCase ().contains ("PRESSURE" )) return PermissableAction .BUTTON ;
1000
1000
return null ;
1001
1001
}
1002
1002
} else {
@@ -1029,11 +1029,6 @@ private static PermissableAction GetPermissionFromUsableBlock(Material material)
1029
1029
case BREWING_STAND :
1030
1030
return PermissableAction .CONTAINER ;
1031
1031
default :
1032
- // Check for doors that might have diff material name in old version.
1033
- if (material .name ().contains ("DOOR" ))
1034
- return PermissableAction .DOOR ;
1035
- if (material .toString ().toUpperCase ().contains ("BUTTON" ) || material .toString ().toUpperCase ().contains ("PRESSURE" ))
1036
- return PermissableAction .BUTTON ;
1037
1032
return null ;
1038
1033
}
1039
1034
}
0 commit comments