removeHooks: return ids in order of given set of hooks.

This commit is contained in:
asofold 2012-08-24 21:26:08 +02:00
parent f662f98369
commit a9dd83bf37

View File

@ -3,7 +3,7 @@ package fr.neatmonster.nocheatplus.hooks;
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
import java.util.HashSet;
import java.util.LinkedHashSet;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
@ -368,10 +368,10 @@ public final class NCPHookManager {
*
* @param hooks
* the hooks
* @return a set of the removed hooks ids
* @return a set of the removed hooks ids, same order as the given collection (hooks).
*/
public static Set<Integer> removeHooks(final Collection<NCPHook> hooks) {
final Set<Integer> ids = new HashSet<Integer>();
final Set<Integer> ids = new LinkedHashSet<Integer>();
for (final NCPHook hook : hooks) {
final Integer id = removeHook(hook);
if (id != null)