Fixed paperlib issue

This commit is contained in:
Indyuce 2021-06-19 23:52:22 +02:00
parent 47261a68ca
commit 3111ee6f13
66 changed files with 15 additions and 23 deletions

33
pom.xml
View File

@ -36,6 +36,7 @@
<directory>${basedir}/src/main/resources/</directory>
</resource>
</resources>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
@ -47,25 +48,13 @@
<encoding>UTF-8</encoding>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.2.4</version>
<version>3.3.0-SNAPSHOT</version>
<configuration>
<relocations>
<relocation>
<pattern>io.papermc.lib</pattern>
<shadedPattern>net.indyuce.mmocore.shaded.paperlib</shadedPattern>
</relocation>
</relocations>
<filters>
<filter>
<artifact>*:*</artifact>
<excludes>
<exclude>net/mmogroup/**</exclude>
</excludes>
</filter>
</filters>
<minimizeJar>false</minimizeJar>
</configuration>
<executions>
<execution>
@ -76,6 +65,7 @@
</execution>
</executions>
</plugin>
</plugins>
</build>
@ -194,7 +184,6 @@
<groupId>io.papermc</groupId>
<artifactId>paperlib</artifactId>
<version>1.0.5</version>
<scope>provided</scope>
</dependency>
<dependency>
@ -228,42 +217,42 @@
<!-- Local repo -->
<dependency>
<groupId>net.Indyuce.mmoitems.lib</groupId>
<groupId>net.Indyuce.mmocore.lib</groupId>
<artifactId>Residence</artifactId>
<version>4.8.7.2</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>net.Indyuce.mmoitems.lib</groupId>
<groupId>net.Indyuce.mmocore.lib</groupId>
<artifactId>CMI</artifactId>
<version>8.6.5.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>net.Indyuce.mmoitems.lib</groupId>
<groupId>net.Indyuce.mmocore.lib</groupId>
<artifactId>Holograms</artifactId>
<version>2.9.1</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>net.Indyuce.mmoitems.lib</groupId>
<groupId>net.Indyuce.mmocore.lib</groupId>
<artifactId>HolographicDisplays</artifactId>
<version>2.4.6</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>net.Indyuce.mmoitems.lib</groupId>
<groupId>net.Indyuce.mmocore.lib</groupId>
<artifactId>Citizens</artifactId>
<version>2.0.25</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>net.Indyuce.mmoitems.lib</groupId>
<groupId>net.Indyuce.mmocore.lib</groupId>
<artifactId>SpartanAPI</artifactId>
<version>1.0</version>
<scope>provided</scope>

View File

@ -5,6 +5,7 @@ import java.lang.reflect.Field;
import java.util.HashSet;
import java.util.logging.Level;
import io.papermc.lib.PaperLib;
import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
import org.bukkit.command.CommandMap;
@ -168,6 +169,8 @@ public class MMOCore extends LuminePlugin {
new Metrics(this);
saveDefaultConfig();
PaperLib.getMinecraftVersion();
final int configVersion = getConfig().contains("config-version", true) ? getConfig().getInt("config-version") : -1;
final int defConfigVersion = getConfig().getDefaults().getInt("config-version");
if (configVersion != defConfigVersion) {

View File

@ -51,7 +51,7 @@ public class PlayerStats {
* MMOLib. must be ran everytime the player levels up or changes class.
*/
public synchronized void updateStats() {
getMap().getInstances().forEach(ins -> ins.removeIf(key -> key.equals("mmocoreClass")));
getMap().getInstances().forEach(ins -> ins.remove("mmocoreClass"));
for (StatType stat : StatType.values()) {
StatInstance instance = getMap().getInstance(stat.name());