File tree Expand file tree Collapse file tree
src/main/java/in/twizmwaz/cardinal/util Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -89,15 +89,15 @@ public static MaterialPattern getSingleMaterialPattern(@NonNull String in) {
8989 MaterialPattern pattern = new MaterialPattern ();
9090 if (in .contains (":" )) {
9191 String [] parts = in .split (":" );
92- Material type = Material .matchMaterial (parts [0 ]);
92+ Material type = Material .matchMaterial (parts [0 ]. trim () );
9393 if (type == null ) {
94- throw new IllegalArgumentException ();
94+ throw new IllegalArgumentException (" \" " + parts [ 0 ]. trim () + " \" " + " cannot be mapped to a material" );
9595 }
9696 pattern .add (type , Numbers .parseInteger (parts [1 ]));
9797 } else {
98- Material type = Material .matchMaterial (in );
98+ Material type = Material .matchMaterial (in . trim () );
9999 if (type == null ) {
100- throw new IllegalArgumentException ();
100+ throw new IllegalArgumentException (" \" " + in . trim () + " \" " + " cannot be mapped to a material" );
101101 }
102102 pattern .add (type , ANY_DATA_VALUE );
103103 }
You can’t perform that action at this time.
0 commit comments