Your stacktrace is saying that you are trying to modify your collection from another thread. You could either try to synchronize your methods or use something like a ConcurrentHashMap.
If you don't really need the modification to be on another thread, you could also use Bukkit's schedule facility to do the job :
private final Map<T> map = new HashMap<T>();
// ... stuff happens
final T value;
// work with your value
server.getScheduler().scheduleSyncDelayedTask(plugin, new Runnable() {
public void run() {
map.add(value);
}
}, 0L);
// runs the run() method after 0 ticks on the main thread