Make use of Set when checking for contained objects.
This commit is contained in:
@@ -18,7 +18,7 @@
|
||||
package org.l2jmobius;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import org.l2jmobius.util.PropertiesParser;
|
||||
@@ -68,7 +68,7 @@ public class Config
|
||||
public static int KARMA_MAX_KARMA;
|
||||
public static float KARMA_LOST_MULTIPLIER;
|
||||
public static int KARMA_DROP_CHANCE;
|
||||
public static List<Integer> KARMA_PROTECTED_ITEMS;
|
||||
public static Set<Integer> KARMA_PROTECTED_ITEMS;
|
||||
// ThreadPool
|
||||
public static int SCHEDULED_THREAD_POOL_COUNT;
|
||||
public static int THREADS_PER_SCHEDULED_THREAD_POOL;
|
||||
@@ -117,7 +117,7 @@ public class Config
|
||||
KARMA_MAX_KARMA = karmaConfig.getInt("KarmaMax", 10000);
|
||||
KARMA_LOST_MULTIPLIER = karmaConfig.getFloat("KarmaLostMultiplier", 1);
|
||||
KARMA_DROP_CHANCE = karmaConfig.getInt("KarmaDropChance", 5);
|
||||
KARMA_PROTECTED_ITEMS = Arrays.stream(karmaConfig.getIntArray("KarmaProtectedItems", ";")).boxed().collect(Collectors.toList());
|
||||
KARMA_PROTECTED_ITEMS.addAll(Arrays.stream(karmaConfig.getIntArray("KarmaProtectedItems", ";")).boxed().collect(Collectors.toList()));
|
||||
|
||||
// Load threadpool config file (if exists)
|
||||
final PropertiesParser threadpoolConfig = new PropertiesParser(THREADPOOL_CONFIG_FILE);
|
||||
|
Reference in New Issue
Block a user