mirror of
https://github.com/ChestShop-authors/ChestShop-3.git
synced 2024-11-27 12:38:40 +01:00
Properly split the material name (Fixes #114)
This commit is contained in:
parent
d04e17450b
commit
26ddb52434
@ -281,8 +281,8 @@ public class MaterialUtil {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (int index = split[0].indexOf(' '); index >= 0; index = split[0].indexOf(' ', index + 1)) {
|
for (int index = split[0].indexOf(' '); index >= 0 && index + 1 < split[0].length(); index = split[0].indexOf(' ', index + 1)) {
|
||||||
material = getMaterial(split[0].substring(index));
|
material = getMaterial(split[0].substring(index + 1));
|
||||||
|
|
||||||
if (material != null) {
|
if (material != null) {
|
||||||
if (durability == 0) {
|
if (durability == 0) {
|
||||||
|
Loading…
Reference in New Issue
Block a user