diff --git a/Mage.Client/src/main/java/mage/client/dialog/PreferencesDialog.form b/Mage.Client/src/main/java/mage/client/dialog/PreferencesDialog.form
index c2f5942521..ebea76ef65 100644
--- a/Mage.Client/src/main/java/mage/client/dialog/PreferencesDialog.form
+++ b/Mage.Client/src/main/java/mage/client/dialog/PreferencesDialog.form
@@ -4378,11 +4378,11 @@
-
+
-
+
@@ -4416,8 +4416,8 @@
-
-
+
+
@@ -4453,7 +4453,7 @@
-
+
@@ -4469,7 +4469,7 @@
-
+
diff --git a/Mage.Client/src/main/java/mage/client/dialog/PreferencesDialog.java b/Mage.Client/src/main/java/mage/client/dialog/PreferencesDialog.java
index 6efba3c286..cfd05aa198 100644
--- a/Mage.Client/src/main/java/mage/client/dialog/PreferencesDialog.java
+++ b/Mage.Client/src/main/java/mage/client/dialog/PreferencesDialog.java
@@ -81,7 +81,7 @@ public class PreferencesDialog extends javax.swing.JDialog {
public static final String KEY_CARD_IMAGES_THREADS = "cardImagesThreads";
public static final String KEY_CARD_IMAGES_THREADS_DEFAULT = "3";
public static final String KEY_CARD_IMAGES_SAVE_TO_ZIP = "cardImagesSaveToZip";
- public static final String KEY_CARD_IMAGES_PREF_LANGUAGE = "cardImagesPreferedImageLaguage";
+ public static final String KEY_CARD_IMAGES_PREF_LANGUAGE = "cardImagesPreferredImageLaguage";
public static final String KEY_CARD_RENDERING_FALLBACK = "cardRenderingFallback";
public static final String KEY_CARD_RENDERING_ICONS_FOR_ABILITIES = "cardRenderingIconsForAbilities";
@@ -400,7 +400,7 @@ public class PreferencesDialog extends javax.swing.JDialog {
cbTheme.setModel(new DefaultComboBoxModel<>(ThemeType.values()));
addAvatars();
- cbPreferedImageLanguage.setModel(new DefaultComboBoxModel<>(CardLanguage.toList()));
+ cbPreferredImageLanguage.setModel(new DefaultComboBoxModel<>(CardLanguage.toList()));
cbNumberOfDownloadThreads.setModel(new DefaultComboBoxModel<>(new String[]{"10", "9", "8", "7", "6", "5", "4", "3", "2", "1"}));
}
@@ -509,8 +509,8 @@ public class PreferencesDialog extends javax.swing.JDialog {
txtImageFolderPath = new javax.swing.JTextField();
btnBrowseImageLocation = new javax.swing.JButton();
cbSaveToZipFiles = new javax.swing.JCheckBox();
- cbPreferedImageLanguage = new javax.swing.JComboBox<>();
- labelPreferedImageLanguage = new javax.swing.JLabel();
+ cbPreferredImageLanguage = new javax.swing.JComboBox<>();
+ labelPreferredImageLanguage = new javax.swing.JLabel();
labelNumberOfDownloadThreads = new javax.swing.JLabel();
cbNumberOfDownloadThreads = new javax.swing.JComboBox();
labelHint1 = new javax.swing.JLabel();
@@ -1658,11 +1658,11 @@ public class PreferencesDialog extends javax.swing.JDialog {
}
});
- cbPreferedImageLanguage.setMaximumRowCount(20);
- cbPreferedImageLanguage.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));
+ cbPreferredImageLanguage.setMaximumRowCount(20);
+ cbPreferredImageLanguage.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));
- labelPreferedImageLanguage.setText("Default images language:");
- labelPreferedImageLanguage.setFocusable(false);
+ labelPreferredImageLanguage.setText("Default images language:");
+ labelPreferredImageLanguage.setFocusable(false);
labelNumberOfDownloadThreads.setText("Default download threads:");
@@ -1689,10 +1689,10 @@ public class PreferencesDialog extends javax.swing.JDialog {
.add(panelCardImagesLayout.createSequentialGroup()
.add(panelCardImagesLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(labelNumberOfDownloadThreads)
- .add(labelPreferedImageLanguage))
+ .add(labelPreferredImageLanguage))
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
.add(panelCardImagesLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
- .add(cbPreferedImageLanguage, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 153, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
+ .add(cbPreferredImageLanguage, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 153, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.add(panelCardImagesLayout.createSequentialGroup()
.add(cbNumberOfDownloadThreads, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 153, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED)
@@ -1716,8 +1716,8 @@ public class PreferencesDialog extends javax.swing.JDialog {
.add(labelHint1))
.addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED)
.add(panelCardImagesLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
- .add(labelPreferedImageLanguage)
- .add(cbPreferedImageLanguage, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)))
+ .add(labelPreferredImageLanguage)
+ .add(cbPreferredImageLanguage, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)))
);
panelCardStyles.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createEtchedBorder(), "Card styles (restart xmage to apply new settings)"));
@@ -2945,7 +2945,7 @@ public class PreferencesDialog extends javax.swing.JDialog {
saveImagesPath(prefs);
save(prefs, dialog.cbSaveToZipFiles, KEY_CARD_IMAGES_SAVE_TO_ZIP, "true", "false", UPDATE_CACHE_POLICY);
save(prefs, dialog.cbNumberOfDownloadThreads, KEY_CARD_IMAGES_THREADS);
- save(prefs, dialog.cbPreferedImageLanguage, KEY_CARD_IMAGES_PREF_LANGUAGE);
+ save(prefs, dialog.cbPreferredImageLanguage, KEY_CARD_IMAGES_PREF_LANGUAGE);
save(prefs, dialog.cbUseDefaultBackground, KEY_BACKGROUND_IMAGE_DEFAULT, "true", "false", UPDATE_CACHE_POLICY);
save(prefs, dialog.cbUseDefaultBattleImage, KEY_BATTLEFIELD_IMAGE_DEFAULT, "true", "false", UPDATE_CACHE_POLICY);
@@ -3518,7 +3518,7 @@ public class PreferencesDialog extends javax.swing.JDialog {
}
load(prefs, dialog.cbSaveToZipFiles, KEY_CARD_IMAGES_SAVE_TO_ZIP, "true");
dialog.cbNumberOfDownloadThreads.setSelectedItem(MageFrame.getPreferences().get(KEY_CARD_IMAGES_THREADS, KEY_CARD_IMAGES_THREADS_DEFAULT));
- dialog.cbPreferedImageLanguage.setSelectedItem(MageFrame.getPreferences().get(KEY_CARD_IMAGES_PREF_LANGUAGE, CardLanguage.ENGLISH.getCode()));
+ dialog.cbPreferredImageLanguage.setSelectedItem(MageFrame.getPreferences().get(KEY_CARD_IMAGES_PREF_LANGUAGE, CardLanguage.ENGLISH.getCode()));
// rendering settings
load(prefs, dialog.cbCardRenderImageFallback, KEY_CARD_RENDERING_FALLBACK, "true", "false");
@@ -4073,7 +4073,7 @@ public class PreferencesDialog extends javax.swing.JDialog {
private javax.swing.JComboBox cbNumberOfDownloadThreads;
private javax.swing.JCheckBox cbPassPriorityActivation;
private javax.swing.JCheckBox cbPassPriorityCast;
- private javax.swing.JComboBox cbPreferedImageLanguage;
+ private javax.swing.JComboBox cbPreferredImageLanguage;
private javax.swing.JComboBox cbProxyType;
private javax.swing.JCheckBox cbSaveToZipFiles;
private javax.swing.JCheckBox cbShowStormCounter;
@@ -4176,7 +4176,7 @@ public class PreferencesDialog extends javax.swing.JDialog {
private javax.swing.JLabel labelMainStep;
private javax.swing.JLabel labelNextTurn;
private javax.swing.JLabel labelNumberOfDownloadThreads;
- private javax.swing.JLabel labelPreferedImageLanguage;
+ private javax.swing.JLabel labelPreferredImageLanguage;
private javax.swing.JLabel labelPriorEnd;
private javax.swing.JLabel labelSkipStep;
private javax.swing.JLabel labelStackWidth;
diff --git a/Mage.Server/src/main/java/mage/server/ChatManagerImpl.java b/Mage.Server/src/main/java/mage/server/ChatManagerImpl.java
index 1bd283e03e..dbdbb00dd5 100644
--- a/Mage.Server/src/main/java/mage/server/ChatManagerImpl.java
+++ b/Mage.Server/src/main/java/mage/server/ChatManagerImpl.java
@@ -128,7 +128,7 @@ public class ChatManagerImpl implements ChatManager {
Matcher matchPattern = cardNamePattern.matcher(message);
while (matchPattern.find()) {
String cardName = matchPattern.group(1);
- CardInfo cardInfo = CardRepository.instance.findPreferedCoreExpansionCard(cardName, true);
+ CardInfo cardInfo = CardRepository.instance.findPreferredCoreExpansionCard(cardName, true);
if (cardInfo != null) {
String colour = "silver";
if (cardInfo.getCard().getColor(null).isMulticolored()) {
@@ -270,7 +270,7 @@ public class ChatManagerImpl implements ChatManager {
Matcher matchPattern = getCardTextPattern.matcher(message.toLowerCase(Locale.ENGLISH));
if (matchPattern.find()) {
String cardName = matchPattern.group(1);
- CardInfo cardInfo = CardRepository.instance.findPreferedCoreExpansionCard(cardName, true);
+ CardInfo cardInfo = CardRepository.instance.findPreferredCoreExpansionCard(cardName, true);
if (cardInfo != null) {
cardInfo.getRules();
message = "" + cardInfo.getName() + ": Cost:" + cardInfo.getManaCosts(CardInfo.ManaCostSide.ALL).toString() + ", Types:" + cardInfo.getTypes().toString() + ", ";
diff --git a/Mage.Tests/src/test/java/org/mage/test/decks/importer/TxtDeckImporterTest.java b/Mage.Tests/src/test/java/org/mage/test/decks/importer/TxtDeckImporterTest.java
index 50180ee3d3..4043e013be 100644
--- a/Mage.Tests/src/test/java/org/mage/test/decks/importer/TxtDeckImporterTest.java
+++ b/Mage.Tests/src/test/java/org/mage/test/decks/importer/TxtDeckImporterTest.java
@@ -21,13 +21,13 @@ public class TxtDeckImporterTest {
String[] sideboard = {"Swamp", "Mountain"};
for (String c : cards) {
- card = CardRepository.instance.findPreferedCoreExpansionCard(c, true);
+ card = CardRepository.instance.findPreferredCoreExpansionCard(c, true);
assert card != null;
deck.getCards().add(new DeckCardInfo(card.getName(), card.getCardNumber(), card.getSetCode()));
}
for (String s : sideboard) {
- card = CardRepository.instance.findPreferedCoreExpansionCard(s, true);
+ card = CardRepository.instance.findPreferredCoreExpansionCard(s, true);
assert card != null;
deck.getSideboard().add(new DeckCardInfo(card.getName(), card.getCardNumber(), card.getSetCode()));
}
diff --git a/Mage.Verify/src/test/java/mage/verify/VerifyCardDataTest.java b/Mage.Verify/src/test/java/mage/verify/VerifyCardDataTest.java
index b657083410..62b7cf39ee 100644
--- a/Mage.Verify/src/test/java/mage/verify/VerifyCardDataTest.java
+++ b/Mage.Verify/src/test/java/mage/verify/VerifyCardDataTest.java
@@ -1849,7 +1849,7 @@ public class VerifyCardDataTest {
if (!cardId.getExtension().isEmpty()) {
cardInfo = CardRepository.instance.findCardWPreferredSet(cardId.getName(), cardId.getExtension(), false);
} else {
- cardInfo = CardRepository.instance.findPreferedCoreExpansionCard(cardId.getName(), false);
+ cardInfo = CardRepository.instance.findPreferredCoreExpansionCard(cardId.getName(), false);
}
if (cardInfo == null) {
errorsList.add("Error: broken cube, can't find card: " + cube.getClass().getCanonicalName() + " - " + cardId.getName());
diff --git a/Mage/src/main/java/mage/cards/Sets.java b/Mage/src/main/java/mage/cards/Sets.java
index 18a94102ec..1435da7c90 100644
--- a/Mage/src/main/java/mage/cards/Sets.java
+++ b/Mage/src/main/java/mage/cards/Sets.java
@@ -199,10 +199,10 @@ public class Sets extends HashMap {
return null;
}
- public static ExpansionSet.SetCardInfo findCardByClass(Class> clazz, String preferedSetCode) {
+ public static ExpansionSet.SetCardInfo findCardByClass(Class> clazz, String preferredSetCode) {
ExpansionSet.SetCardInfo info = null;
- if (instance.containsKey(preferedSetCode)) {
- info = instance.get(preferedSetCode).findCardInfoByClass(clazz).stream().findFirst().orElse(null);
+ if (instance.containsKey(preferredSetCode)) {
+ info = instance.get(preferredSetCode).findCardInfoByClass(clazz).stream().findFirst().orElse(null);
}
if (info == null) {
diff --git a/Mage/src/main/java/mage/cards/decks/importer/CardLookup.java b/Mage/src/main/java/mage/cards/decks/importer/CardLookup.java
index 73d07878e9..2998803e36 100644
--- a/Mage/src/main/java/mage/cards/decks/importer/CardLookup.java
+++ b/Mage/src/main/java/mage/cards/decks/importer/CardLookup.java
@@ -12,7 +12,7 @@ public class CardLookup {
public static final CardLookup instance = new CardLookup();
public Optional lookupCardInfo(String name) {
- return Optional.ofNullable(CardRepository.instance.findPreferedCoreExpansionCard(name, true));
+ return Optional.ofNullable(CardRepository.instance.findPreferredCoreExpansionCard(name, true));
}
public List lookupCardInfo(CardCriteria criteria) {
diff --git a/Mage/src/main/java/mage/cards/decks/importer/DckDeckImporter.java b/Mage/src/main/java/mage/cards/decks/importer/DckDeckImporter.java
index 834aaf0ef8..0b9119d566 100644
--- a/Mage/src/main/java/mage/cards/decks/importer/DckDeckImporter.java
+++ b/Mage/src/main/java/mage/cards/decks/importer/DckDeckImporter.java
@@ -92,7 +92,7 @@ public class DckDeckImporter extends PlainTextDeckImporter {
}
if (!cardName.equals("")) {
- foundedCard = CardRepository.instance.findPreferedCoreExpansionCard(cardName, false, setCode);
+ foundedCard = CardRepository.instance.findPreferredCoreExpansionCard(cardName, false, setCode);
}
if (foundedCard != null) {
diff --git a/Mage/src/main/java/mage/cards/decks/importer/DekDeckImporter.java b/Mage/src/main/java/mage/cards/decks/importer/DekDeckImporter.java
index 2bb529ce89..af3c484156 100644
--- a/Mage/src/main/java/mage/cards/decks/importer/DekDeckImporter.java
+++ b/Mage/src/main/java/mage/cards/decks/importer/DekDeckImporter.java
@@ -21,7 +21,7 @@ public class DekDeckImporter extends PlainTextDeckImporter {
Integer cardCount = Integer.parseInt(extractAttribute(line, "Quantity"));
String cardName = extractAttribute(line, "Name");
boolean isSideboard = "true".equals(extractAttribute(line, "Sideboard"));
- CardInfo cardInfo = CardRepository.instance.findPreferedCoreExpansionCard(cardName, true);
+ CardInfo cardInfo = CardRepository.instance.findPreferredCoreExpansionCard(cardName, true);
if (cardInfo == null) {
sbMessage.append("Could not find card: '").append(cardName).append("' at line ").append(lineCount).append('\n');
} else {
diff --git a/Mage/src/main/java/mage/cards/decks/importer/TxtDeckImporter.java b/Mage/src/main/java/mage/cards/decks/importer/TxtDeckImporter.java
index 002c7711a8..8b940b39ed 100644
--- a/Mage/src/main/java/mage/cards/decks/importer/TxtDeckImporter.java
+++ b/Mage/src/main/java/mage/cards/decks/importer/TxtDeckImporter.java
@@ -126,7 +126,7 @@ public class TxtDeckImporter extends PlainTextDeckImporter {
wasCardLines = true;
- CardInfo cardInfo = CardRepository.instance.findPreferedCoreExpansionCard(lineName, true);
+ CardInfo cardInfo = CardRepository.instance.findPreferredCoreExpansionCard(lineName, true);
if (cardInfo == null) {
sbMessage.append("Could not find card: '").append(lineName).append("' at line ").append(lineCount).append('\n');
} else {
diff --git a/Mage/src/main/java/mage/cards/repository/CardRepository.java b/Mage/src/main/java/mage/cards/repository/CardRepository.java
index 1a83934c3b..fcfc1ce01a 100644
--- a/Mage/src/main/java/mage/cards/repository/CardRepository.java
+++ b/Mage/src/main/java/mage/cards/repository/CardRepository.java
@@ -381,26 +381,26 @@ public enum CardRepository {
return null;
}
- public CardInfo findPreferedCoreExpansionCard(String name, boolean caseInsensitive) {
- return findPreferedCoreExpansionCard(name, caseInsensitive, null);
+ public CardInfo findPreferredCoreExpansionCard(String name, boolean caseInsensitive) {
+ return findPreferredCoreExpansionCard(name, caseInsensitive, null);
}
- public CardInfo findPreferedCoreExpansionCard(String name, boolean caseInsensitive, String preferedSetCode) {
+ public CardInfo findPreferredCoreExpansionCard(String name, boolean caseInsensitive, String preferredSetCode) {
List cards;
if (caseInsensitive) {
cards = findCardsCaseInsensitive(name);
} else {
cards = findCards(name);
}
- return findPreferedOrLatestCard(cards, preferedSetCode);
+ return findPreferredOrLatestCard(cards, preferredSetCode);
}
- public CardInfo findPreferedCoreExpansionCardByClassName(String canonicalClassName, String preferedSetCode) {
+ public CardInfo findPreferredCoreExpansionCardByClassName(String canonicalClassName, String preferredSetCode) {
List cards = findCardsByClass(canonicalClassName);
- return findPreferedOrLatestCard(cards, preferedSetCode);
+ return findPreferredOrLatestCard(cards, preferredSetCode);
}
- private CardInfo findPreferedOrLatestCard(List cards, String preferedSetCode) {
+ private CardInfo findPreferredOrLatestCard(List cards, String preferredSetCode) {
if (!cards.isEmpty()) {
Date lastReleaseDate = null;
Date lastExpansionDate = null;
@@ -409,7 +409,7 @@ public enum CardRepository {
ExpansionInfo set = ExpansionRepository.instance.getSetByCode(cardinfo.getSetCode());
if (set != null) {
- if ((preferedSetCode != null) && (preferedSetCode.equals(set.getCode()))) {
+ if ((preferredSetCode != null) && (preferredSetCode.equals(set.getCode()))) {
return cardinfo;
}
@@ -443,7 +443,7 @@ public enum CardRepository {
}
}
}
- return findPreferedCoreExpansionCard(name, true);
+ return findPreferredCoreExpansionCard(name, true);
}
public List findCards(String name) {
diff --git a/Mage/src/main/java/mage/game/draft/DraftCube.java b/Mage/src/main/java/mage/game/draft/DraftCube.java
index 5c4e63cc99..70b96132ec 100644
--- a/Mage/src/main/java/mage/game/draft/DraftCube.java
+++ b/Mage/src/main/java/mage/game/draft/DraftCube.java
@@ -86,7 +86,7 @@ public abstract class DraftCube {
if (!cardId.getExtension().isEmpty()) {
cardInfo = CardRepository.instance.findCardWPreferredSet(cardId.getName(), cardId.getExtension(), false);
} else {
- cardInfo = CardRepository.instance.findPreferedCoreExpansionCard(cardId.getName(), false);
+ cardInfo = CardRepository.instance.findPreferredCoreExpansionCard(cardId.getName(), false);
}
if (cardInfo != null) {