// get the named team
AutoRefTeam team = match.getTeam(args[0]);
if (team == null) return false;
// find the named goal for this team
ScoreDummyGoal goal = null;
for (ScoreDummyGoal dgoal : team.getTeamGoals(ScoreDummyGoal.class))
if (args[1].equalsIgnoreCase(dgoal.getName())) goal = dgoal;
if (goal == null) return false;
try
{
// go ahead and set the goal to the new score
goal.setScore(Double.parseDouble(args[2]));
// update objectives and recheck win conditions
team.updateObjectives();
match.checkWinConditions();
}