Skip to content

Commit

Permalink
Changed it so when failing to retrieve mappings for a version the plu…
Browse files Browse the repository at this point in the history
…gin continues to work instead of failure (#1339)
  • Loading branch information
OmerBenGera committed Sep 3, 2022
1 parent 939efc4 commit 17824f2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Expand Up @@ -68,7 +68,7 @@ dependencies {

implementation 'com.bgsoftware.common.config:CommentedConfiguration:1.0.3'
implementation 'com.bgsoftware.common.updater:Updater:latest'
implementation 'com.bgsoftware.common.mappings:MappingsChecker:1.0.0'
implementation 'com.bgsoftware.common.mappings:MappingsChecker:1.0.1'
implementation 'com.bgsoftware.common.reflection:ReflectionUtils:1.0.2'
implementation 'com.bgsoftware.common.executors:Executors:1.0.1'
implementation 'com.bgsoftware.common.remaps:RemapsChecker:1.0.0'
Expand Down
Expand Up @@ -390,7 +390,10 @@ private boolean loadNMSAdapter() {

String mappingVersionHash = nmsAlgorithms.getMappingsHash();

if (mappingVersionHash != null && !MappingsChecker.checkMappings(mappingVersionHash, version)) {
if (mappingVersionHash != null && !MappingsChecker.checkMappings(mappingVersionHash, version, error -> {
log("&cFailed to retrieve allowed mappings for your server, skipping...");
return true;
})) {
new ManagerLoadException("The plugin doesn't support your version mappings.\nPlease try a different version.\n" +
"Mappings Hash: " + mappingVersionHash, ManagerLoadException.ErrorLevel.SERVER_SHUTDOWN).printStackTrace();
return false;
Expand Down

0 comments on commit 17824f2

Please sign in to comment.