forked from External/mage
[C16] Added Boompile.
This commit is contained in:
parent
2ba6bf79f1
commit
3f05e102a0
3 changed files with 324 additions and 258 deletions
|
|
@ -6,7 +6,6 @@ import java.util.ArrayList;
|
|||
import java.util.Arrays;
|
||||
import java.util.HashSet;
|
||||
import java.util.Properties;
|
||||
|
||||
import org.mage.plugins.card.constants.Constants;
|
||||
|
||||
public class SettingsManager {
|
||||
|
|
@ -16,7 +15,9 @@ public class SettingsManager {
|
|||
public static SettingsManager getIntance() {
|
||||
if (settingsManager == null) {
|
||||
synchronized (SettingsManager.class) {
|
||||
if (settingsManager == null) settingsManager = new SettingsManager();
|
||||
if (settingsManager == null) {
|
||||
settingsManager = new SettingsManager();
|
||||
}
|
||||
}
|
||||
}
|
||||
return settingsManager;
|
||||
|
|
@ -34,8 +35,9 @@ public class SettingsManager {
|
|||
imageUrlProperties = new Properties();
|
||||
try {
|
||||
InputStream is = SettingsManager.class.getClassLoader().getResourceAsStream(Constants.IO.IMAGE_PROPERTIES_FILE);
|
||||
if (is == null)
|
||||
if (is == null) {
|
||||
throw new RuntimeException("Couldn't load " + Constants.IO.IMAGE_PROPERTIES_FILE);
|
||||
}
|
||||
imageUrlProperties.load(is);
|
||||
} catch (IOException ioe) {
|
||||
ioe.printStackTrace();
|
||||
|
|
@ -47,11 +49,11 @@ public class SettingsManager {
|
|||
if (imageUrlProperties != null) {
|
||||
result = imageUrlProperties.getProperty(setName, setName);
|
||||
}
|
||||
return result;
|
||||
return result;
|
||||
}
|
||||
|
||||
public HashSet<String> getIgnoreUrls() {
|
||||
HashSet<String> ignoreUrls = new HashSet<String>();
|
||||
HashSet<String> ignoreUrls = new HashSet<>();
|
||||
if (imageUrlProperties != null) {
|
||||
String result = imageUrlProperties.getProperty("ignore.urls");
|
||||
if (result != null) {
|
||||
|
|
@ -63,7 +65,7 @@ public class SettingsManager {
|
|||
}
|
||||
|
||||
public ArrayList<String> getTokenLookupOrder() {
|
||||
ArrayList<String> order = new ArrayList<String>();
|
||||
ArrayList<String> order = new ArrayList<>();
|
||||
if (imageUrlProperties != null) {
|
||||
String result = imageUrlProperties.getProperty("token.lookup.order");
|
||||
if (result != null) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue