Versionssupport für 1.8, 1.9 und 1.10 #35
@ -143,16 +143,16 @@ class CheckSchemType_12 {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
Material t = Material.getMaterial(item.getString("id").split(":")[1].toUpperCase().replace("SHOVEL", "SPADE"));
|
Material itemType = Material.getMaterial(item.getString("id").split(":")[1].toUpperCase().replace("SHOVEL", "SPADE"));
|
||||||
if(t == null && item.getString("id").equals("minecraft:fire_charge"))
|
if(itemType == null && item.getString("id").equals("minecraft:fire_charge"))
|
||||||
t = Material.FIREBALL;
|
itemType = Material.FIREBALL;
|
||||||
if(t == null) //Leere Slots
|
if(itemType == null) //Leere Slots
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if(blockId == DISPENSER && (t.equals(Material.FIREBALL) || t.equals(Material.ARROW)))
|
if(blockId == DISPENSER && (itemType.equals(Material.FIREBALL) || itemType.equals(Material.ARROW)))
|
||||||
counter += item.getByte("Count");
|
counter += item.getByte("Count");
|
||||||
else if(!FLOWERS.contains(t) && !(blockId == CHEST && t.equals(Material.TNT)))
|
else if(!FLOWERS.contains(itemType) && !(blockId == CHEST && itemType.equals(Material.TNT)))
|
||||||
errors.add("In einem/r " + Material.getMaterial(blockId).name() + " ist das verbotene Item " + t);
|
errors.add("In einem/r " + Material.getMaterial(blockId).name() + " ist das verbotene Item " + itemType);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(counter > type.getMaxDispenserItems())
|
if(counter > type.getMaxDispenserItems())
|
||||||
|
@ -145,14 +145,14 @@ class CheckSchemType_15 {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
Material t = Material.matchMaterial(item.getString("id"));
|
Material itemType = Material.matchMaterial(item.getString("id"));
|
||||||
if(t == null) //Leere Slots
|
if(itemType == null) //Leere Slots
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if(blockMaterial == Material.DISPENSER && (t.equals(Material.FIRE_CHARGE) || t.equals(Material.ARROW)))
|
if(blockMaterial == Material.DISPENSER && (itemType.equals(Material.FIRE_CHARGE) || itemType.equals(Material.ARROW)))
|
||||||
counter += item.getByte("Count");
|
counter += item.getByte("Count");
|
||||||
else if(!FLOWERS.contains(t) && !(blockMaterial == Material.CHEST && t.equals(Material.TNT)))
|
else if(!FLOWERS.contains(itemType) && !(blockMaterial == Material.CHEST && itemType.equals(Material.TNT)))
|
||||||
errors.add("In einem/r " + blockMaterial.name() + " ist das verbotene Item " + t);
|
errors.add("In einem/r " + blockMaterial.name() + " ist das verbotene Item " + itemType);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(counter > type.getMaxDispenserItems())
|
if(counter > type.getMaxDispenserItems())
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren