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