aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/io/github/moulberry/notenoughupdates/miscgui/GuiEnchantColour.java
diff options
context:
space:
mode:
authorMoulberry <jjenour@student.unimelb.edu.au>2021-10-13 15:46:13 +0800
committerGitHub <noreply@github.com>2021-10-13 15:46:13 +0800
commitb11742988dec635b5c5da7c2363803cbfafb37b1 (patch)
treed161c7ab2f675dd1f82d2fe8194d7e62bbdaac0a /src/main/java/io/github/moulberry/notenoughupdates/miscgui/GuiEnchantColour.java
parent8eee6262a6e2c372240331f3c43c2279bd18539e (diff)
parent030f72bb49ab4bca0c35899090550432c5aa0bea (diff)
downloadnotenoughupdates-b11742988dec635b5c5da7c2363803cbfafb37b1.tar.gz
notenoughupdates-b11742988dec635b5c5da7c2363803cbfafb37b1.tar.bz2
notenoughupdates-b11742988dec635b5c5da7c2363803cbfafb37b1.zip
Merge pull request #231 from DoKM/master
DoKM Fork Merge
Diffstat (limited to 'src/main/java/io/github/moulberry/notenoughupdates/miscgui/GuiEnchantColour.java')
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/miscgui/GuiEnchantColour.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/miscgui/GuiEnchantColour.java b/src/main/java/io/github/moulberry/notenoughupdates/miscgui/GuiEnchantColour.java
index f9344a3a..4bbcdbdd 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/miscgui/GuiEnchantColour.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/miscgui/GuiEnchantColour.java
@@ -67,7 +67,7 @@ public class GuiEnchantColour extends GuiScreen {
public static int UNDERLINE_MODIFIER = 0b1000;
public static int STRIKETHROUGH_MODIFIER = 0b10000;
private Gson gson = new Gson();
- private static final Pattern settingPattern = Pattern.compile(".*:[>=<]:[0-9]:[a-zA-Z0-9]:[0-9][0-9]?");
+ private static final Pattern settingPattern = Pattern.compile(".*:[>=<]:[0-9]+:[a-zA-Z0-9]+(:[a-zA-Z0-9])?");
private List<String> getEnchantNamesPretty() {
if(enchantNamesPretty == null) {
@@ -318,7 +318,7 @@ public class GuiEnchantColour extends GuiScreen {
} catch (IllegalArgumentException e){
return false;
}
- } catch (HeadlessException | IOException | UnsupportedFlavorException e) {
+ } catch (HeadlessException | IOException | UnsupportedFlavorException | IllegalStateException e) {
return false;
}
}