@@ -29,30 +29,30 @@ public class MaterialUtils {
29
29
30
30
private static final Set <Material > WALL_SIGNS = new HashSet <Material >() {
31
31
{
32
- add (getMat ("WALL_SIGN" ));
33
- add (getMat ("ACACIA_WALL_SIGN" ));
34
- add (getMat ("BIRCH_WALL_SIGN" ));
35
- add (getMat ("DARK_OAK_WALL_SIGN" ));
36
- add (getMat ("JUNGLE_WALL_SIGN" ));
37
- add (getMat ("OAK_WALL_SIGN" ));
38
- add (getMat ("SPRUCE_WALL_SIGN" ));
39
- add (getMat ("WARPED_WALL_SIGN" ));
40
- add (getMat ("CRIMSON_WALL_SIGN" ));
32
+ add (getMaterial ("WALL_SIGN" ));
33
+ add (getMaterial ("ACACIA_WALL_SIGN" ));
34
+ add (getMaterial ("BIRCH_WALL_SIGN" ));
35
+ add (getMaterial ("DARK_OAK_WALL_SIGN" ));
36
+ add (getMaterial ("JUNGLE_WALL_SIGN" ));
37
+ add (getMaterial ("OAK_WALL_SIGN" ));
38
+ add (getMaterial ("SPRUCE_WALL_SIGN" ));
39
+ add (getMaterial ("WARPED_WALL_SIGN" ));
40
+ add (getMaterial ("CRIMSON_WALL_SIGN" ));
41
41
}
42
42
};
43
43
44
44
public static final Set <Material > BASIC_SIGNS = new HashSet <Material >() {
45
45
{
46
- add (getMat ("SIGN" ));
47
- add (getMat ("STANDING_SIGN" ));
48
- add (getMat ("ACACIA_SIGN" ));
49
- add (getMat ("BIRCH_SIGN" ));
50
- add (getMat ("DARK_OAK_SIGN" ));
51
- add (getMat ("JUNGLE_SIGN" ));
52
- add (getMat ("OAK_SIGN" ));
53
- add (getMat ("SPRUCE_SIGN" ));
54
- add (getMat ("WARPED_SIGN" ));
55
- add (getMat ("CRIMSON_SIGN" ));
46
+ add (getMaterial ("SIGN" ));
47
+ add (getMaterial ("STANDING_SIGN" ));
48
+ add (getMaterial ("ACACIA_SIGN" ));
49
+ add (getMaterial ("BIRCH_SIGN" ));
50
+ add (getMaterial ("DARK_OAK_SIGN" ));
51
+ add (getMaterial ("JUNGLE_SIGN" ));
52
+ add (getMaterial ("OAK_SIGN" ));
53
+ add (getMaterial ("SPRUCE_SIGN" ));
54
+ add (getMaterial ("WARPED_SIGN" ));
55
+ add (getMaterial ("CRIMSON_SIGN" ));
56
56
}
57
57
};
58
58
@@ -65,16 +65,16 @@ public class MaterialUtils {
65
65
66
66
public static final Set <Material > DOORS = new HashSet <Material >() {
67
67
{
68
- add (getMat ("WOODEN_DOOR" ));
69
- add (getMat ("ACACIA_DOOR" ));
70
- add (getMat ("BIRCH_DOOR" ));
71
- add (getMat ("DARK_OAK_DOOR" ));
72
- add (getMat ("JUNGLE_DOOR" ));
73
- add (getMat ("SPRUCE_DOOR" ));
74
- add (getMat ("OAK_DOOR" ));
75
- add (getMat ("WOOD_DOOR" ));
76
- add (getMat ("WARPED_DOOR" ));
77
- add (getMat ("CRIMSON_DOOR" ));
68
+ add (getMaterial ("WOODEN_DOOR" ));
69
+ add (getMaterial ("ACACIA_DOOR" ));
70
+ add (getMaterial ("BIRCH_DOOR" ));
71
+ add (getMaterial ("DARK_OAK_DOOR" ));
72
+ add (getMaterial ("JUNGLE_DOOR" ));
73
+ add (getMaterial ("SPRUCE_DOOR" ));
74
+ add (getMaterial ("OAK_DOOR" ));
75
+ add (getMaterial ("WOOD_DOOR" ));
76
+ add (getMaterial ("WARPED_DOOR" ));
77
+ add (getMaterial ("CRIMSON_DOOR" ));
78
78
}
79
79
};
80
80
@@ -86,11 +86,7 @@ public static boolean isDoor(Material mat) {
86
86
return DOORS .contains (mat );
87
87
}
88
88
89
- private static Material getMat (String name ) {
90
- Material material = Material .getMaterial (name .toUpperCase ());
91
- if (material == null ) {
92
- material = XMaterial .OAK_SIGN .parseMaterial ();
93
- }
94
- return material ;
89
+ private static Material getMaterial (String name ) {
90
+ return XMaterial .matchXMaterial (name .toUpperCase ()).orElse (XMaterial .OAK_DOOR ).get ();
95
91
}
96
92
}
0 commit comments