diff --git a/src/main/java/org/geysermc/discordbot/listeners/ErrorAnalyzer.java b/src/main/java/org/geysermc/discordbot/listeners/ErrorAnalyzer.java index b1420053..81f7a809 100644 --- a/src/main/java/org/geysermc/discordbot/listeners/ErrorAnalyzer.java +++ b/src/main/java/org/geysermc/discordbot/listeners/ErrorAnalyzer.java @@ -190,7 +190,7 @@ private void errorHandler(String error, EmbedBuilder embedBuilder, MessageReceiv break; } - if (error.contains(issue)) { + if (error.toLowerCase().contains(issue.toLowerCase())) { String title = BotHelpers.trim(issue, MessageEmbed.TITLE_MAX_LENGTH); if (MessageHelper.similarFieldExists(embedBuilder.getFields(), title)) { @@ -204,7 +204,7 @@ private void errorHandler(String error, EmbedBuilder embedBuilder, MessageReceiv } // Add any errors from stacktraces - if (exceptions.size() != 0) { + if (!exceptions.isEmpty()) { // Get the github trees for fetching the file paths String branch = "master"; Matcher branchMatcher = BRANCH_PATTERN.matcher(error); diff --git a/src/main/resources/tags/README.md b/src/main/resources/tags/README.md index e7fa80d2..1624b17f 100644 --- a/src/main/resources/tags/README.md +++ b/src/main/resources/tags/README.md @@ -37,3 +37,30 @@ type: text-raw Test ``` + +## Type: Issue only +The below lays out the `issue-only` tag type. This tag will not be registered as a tag that users can run, and only exists to +register responses for issues. It follows the rules that `Issue responses` below sets out. + +```markdown +type: issue-only +issues: || || ... + +--- + +Text +``` + +## Issue responses +Issue responses work with `text`, `text-raw` and `issue-only` types. Any issues listed are registered to have the content of the tag as the issue response. +Different issues are delimited by `||`, allowing differently worded issues to have the same response. +When a message or log file is shared, it will be scanned to check if it contains any known issues. Responses to the issues found will be sent in a single embed. +`text` and `text-raw` types with issues listed can still be called with the tag command; they do not lose their functionality. +```markdown +type: text +issues: || || ... + +--- + +Text +``` diff --git a/src/main/resources/tags/errors/protocollibinjector.tag b/src/main/resources/tags/errors/protocollibinjector.tag new file mode 100644 index 00000000..29a7da9f --- /dev/null +++ b/src/main/resources/tags/errors/protocollibinjector.tag @@ -0,0 +1,6 @@ +type: issue-only +issues: com.comphenix.protocol.injector.netty.ProtocolInjector$3 is not a @Sharable handler, so can't be added or removed multiple times. + +--- + +Update ProtocolLib. diff --git a/src/main/resources/tags/errors/unsupportedjavadetected.tag b/src/main/resources/tags/errors/unsupportedjavadetected.tag new file mode 100644 index 00000000..a55b5b3f --- /dev/null +++ b/src/main/resources/tags/errors/unsupportedjavadetected.tag @@ -0,0 +1,9 @@ +type: issue-only +issues: Unsupported Java detected (60.0) + +--- + +Old server versions do not support Java 16, which Geyser requires. Paper 1.15.2 and higher can be forced to use Java 16 by adding `-DPaper.IgnoreJavaVersion=true` +to the JVM startup flags. +Servers on 1.8.8 can use Java 16 if `use-native-transport` is set to `false` in `server.properties`, although Geyser +does not support versions below 1.12.2 diff --git a/src/main/resources/tags/errors/zipfileclosed.tag b/src/main/resources/tags/errors/zipfileclosed.tag new file mode 100644 index 00000000..bef37e84 --- /dev/null +++ b/src/main/resources/tags/errors/zipfileclosed.tag @@ -0,0 +1,9 @@ +type: issue-only +issues: java.lang.IllegalStateException: zip file closed + +--- + +If **Geyser** is showing this error, there are are a few likely causes: +A: You reloaded Geyser or the server, which is unsupported. Please do a full restart instead. +B: Your Geyser jar is corrupted, and you need to re-download it. +C: Geyser failed to start for a different reason. Check the start of your server logs for a different error explaining why it failed to start. diff --git a/src/main/resources/tags/info/javaversion.tag b/src/main/resources/tags/info/javaversion.tag new file mode 100644 index 00000000..e69de29b