}
}
if (!scriptEntry.hasObject("action"))
throw new InvalidArgumentsException("Must specify a valid action!");
if (!scriptEntry.hasObject("statistic"))
throw new InvalidArgumentsException("Must specify a valid Statistic!");
if (!scriptEntry.hasObject("amount"))
scriptEntry.addObject("amount", new Element(1));
Statistic.Type type = Statistic.valueOf(scriptEntry.getElement("statistic").asString().toUpperCase()).getType();
if (type != Statistic.Type.UNTYPED) {
if ((type == Statistic.Type.BLOCK || type == Statistic.Type.ITEM) && !scriptEntry.hasObject("material"))
throw new InvalidArgumentsException("Must specify a valid " + type.name() + " MATERIAL!");
else if (type == Statistic.Type.ENTITY && !scriptEntry.hasObject("entity"))
throw new InvalidArgumentsException("Must specify a valid ENTITY!");
}
if (!scriptEntry.hasObject("players") && ((BukkitScriptEntryData)scriptEntry.entryData).hasPlayer() && !specified_players)
scriptEntry.addObject("players", new dList(((BukkitScriptEntryData)scriptEntry.entryData).getPlayer().identify()));
if (!scriptEntry.hasObject("players"))
throw new InvalidArgumentsException("Must specify valid players!");
}