@Override public boolean equals(Object o) { if (this == o) { return true; } if (!(o instanceof CommandGoal)) { return false; } CommandGoal other = (CommandGoal) o; return Objects.equals(getId(), other.getId()); }
@Override public CommandGoal getGoalForId(@Nullable String id) { if (isNullOrEmpty(id)) { return getDefaultGoal(); } return getPredefinedGoalById(id).orElse(new BaseCommandGoal(id)); } }