Skip to content

Commit

Permalink
1.6.1
Browse files Browse the repository at this point in the history
  • Loading branch information
ancap-kun committed Feb 17, 2023
1 parent 6908399 commit 25d6b8c
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ private void loadPluginSettings() {

private final Cache<FileConfiguration> configCache = new Cache<>(1_000_000_000);

private ConfigurationSection getConfiguration() {
protected ConfigurationSection getConfiguration() {
return this.getConfiguration("configuration.yml");
}

Expand Down
2 changes: 1 addition & 1 deletion Artifex/dependency-reduced-pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<modelVersion>4.0.0</modelVersion>
<artifactId>Artifex</artifactId>
<name>Artifex</name>
<version>1.6</version>
<version>1.6.1</version>
<description>AncapAPI runtime part</description>
<build>
<finalName>artifex-v${version}</finalName>
Expand Down
2 changes: 1 addition & 1 deletion Artifex/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<packaging>jar</packaging>

<artifactId>Artifex</artifactId>
<version>1.6</version>
<version>1.6.1</version>

<name>Artifex</name>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,7 @@
import org.jetbrains.annotations.Nullable;
import ru.ancap.commons.AncapDebug;

import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.*;
import java.util.function.Function;

@AllArgsConstructor
Expand Down Expand Up @@ -40,9 +37,10 @@ public static BuiltTransferMap makeFor(ConfigurationSection section, int fromVer
});
fullMap.forEach((key, value) -> {if (key <= fromVersion) fullMap.remove(key);});
if (fullMap.size() < 1) return new BuiltTransferMap(Map.of());
AncapDebug.debug(fromVersion + 1);
Map<String, String> first = fullMap.get(fromVersion + 1);
fullMap.remove(fromVersion + 1);
int firstTransfer = Math.max(fromVersion + 1, fullMap.keySet().stream().min(Integer::compareTo).orElse(0));
Map<String, String> first = fullMap.get(firstTransfer);
if (first == null) return BuiltTransferMap.EMPTY;
fullMap.remove(firstTransfer);
fullMap.forEach((version, next) -> first.forEach((old, target) -> {
if (next.containsKey(target)) first.put(old, next.get(target));
}));
Expand Down

0 comments on commit 25d6b8c

Please sign in to comment.