forked from Upstream/mmocore
Fixed paperlib issue
This commit is contained in:
parent
47261a68ca
commit
3111ee6f13
33
pom.xml
33
pom.xml
@ -36,6 +36,7 @@
|
|||||||
<directory>${basedir}/src/main/resources/</directory>
|
<directory>${basedir}/src/main/resources/</directory>
|
||||||
</resource>
|
</resource>
|
||||||
</resources>
|
</resources>
|
||||||
|
|
||||||
<plugins>
|
<plugins>
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
@ -47,25 +48,13 @@
|
|||||||
<encoding>UTF-8</encoding>
|
<encoding>UTF-8</encoding>
|
||||||
</configuration>
|
</configuration>
|
||||||
</plugin>
|
</plugin>
|
||||||
|
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-shade-plugin</artifactId>
|
<artifactId>maven-shade-plugin</artifactId>
|
||||||
<version>3.2.4</version>
|
<version>3.3.0-SNAPSHOT</version>
|
||||||
<configuration>
|
<configuration>
|
||||||
<relocations>
|
<minimizeJar>false</minimizeJar>
|
||||||
<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>
|
|
||||||
</configuration>
|
</configuration>
|
||||||
<executions>
|
<executions>
|
||||||
<execution>
|
<execution>
|
||||||
@ -76,6 +65,7 @@
|
|||||||
</execution>
|
</execution>
|
||||||
</executions>
|
</executions>
|
||||||
</plugin>
|
</plugin>
|
||||||
|
|
||||||
</plugins>
|
</plugins>
|
||||||
</build>
|
</build>
|
||||||
|
|
||||||
@ -194,7 +184,6 @@
|
|||||||
<groupId>io.papermc</groupId>
|
<groupId>io.papermc</groupId>
|
||||||
<artifactId>paperlib</artifactId>
|
<artifactId>paperlib</artifactId>
|
||||||
<version>1.0.5</version>
|
<version>1.0.5</version>
|
||||||
<scope>provided</scope>
|
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
@ -228,42 +217,42 @@
|
|||||||
<!-- Local repo -->
|
<!-- Local repo -->
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>net.Indyuce.mmoitems.lib</groupId>
|
<groupId>net.Indyuce.mmocore.lib</groupId>
|
||||||
<artifactId>Residence</artifactId>
|
<artifactId>Residence</artifactId>
|
||||||
<version>4.8.7.2</version>
|
<version>4.8.7.2</version>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>net.Indyuce.mmoitems.lib</groupId>
|
<groupId>net.Indyuce.mmocore.lib</groupId>
|
||||||
<artifactId>CMI</artifactId>
|
<artifactId>CMI</artifactId>
|
||||||
<version>8.6.5.0</version>
|
<version>8.6.5.0</version>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>net.Indyuce.mmoitems.lib</groupId>
|
<groupId>net.Indyuce.mmocore.lib</groupId>
|
||||||
<artifactId>Holograms</artifactId>
|
<artifactId>Holograms</artifactId>
|
||||||
<version>2.9.1</version>
|
<version>2.9.1</version>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>net.Indyuce.mmoitems.lib</groupId>
|
<groupId>net.Indyuce.mmocore.lib</groupId>
|
||||||
<artifactId>HolographicDisplays</artifactId>
|
<artifactId>HolographicDisplays</artifactId>
|
||||||
<version>2.4.6</version>
|
<version>2.4.6</version>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>net.Indyuce.mmoitems.lib</groupId>
|
<groupId>net.Indyuce.mmocore.lib</groupId>
|
||||||
<artifactId>Citizens</artifactId>
|
<artifactId>Citizens</artifactId>
|
||||||
<version>2.0.25</version>
|
<version>2.0.25</version>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>net.Indyuce.mmoitems.lib</groupId>
|
<groupId>net.Indyuce.mmocore.lib</groupId>
|
||||||
<artifactId>SpartanAPI</artifactId>
|
<artifactId>SpartanAPI</artifactId>
|
||||||
<version>1.0</version>
|
<version>1.0</version>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
|
@ -5,6 +5,7 @@ import java.lang.reflect.Field;
|
|||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
import java.util.logging.Level;
|
import java.util.logging.Level;
|
||||||
|
|
||||||
|
import io.papermc.lib.PaperLib;
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.ChatColor;
|
import org.bukkit.ChatColor;
|
||||||
import org.bukkit.command.CommandMap;
|
import org.bukkit.command.CommandMap;
|
||||||
@ -168,6 +169,8 @@ public class MMOCore extends LuminePlugin {
|
|||||||
new Metrics(this);
|
new Metrics(this);
|
||||||
saveDefaultConfig();
|
saveDefaultConfig();
|
||||||
|
|
||||||
|
PaperLib.getMinecraftVersion();
|
||||||
|
|
||||||
final int configVersion = getConfig().contains("config-version", true) ? getConfig().getInt("config-version") : -1;
|
final int configVersion = getConfig().contains("config-version", true) ? getConfig().getInt("config-version") : -1;
|
||||||
final int defConfigVersion = getConfig().getDefaults().getInt("config-version");
|
final int defConfigVersion = getConfig().getDefaults().getInt("config-version");
|
||||||
if (configVersion != defConfigVersion) {
|
if (configVersion != defConfigVersion) {
|
||||||
|
@ -51,7 +51,7 @@ public class PlayerStats {
|
|||||||
* MMOLib. must be ran everytime the player levels up or changes class.
|
* MMOLib. must be ran everytime the player levels up or changes class.
|
||||||
*/
|
*/
|
||||||
public synchronized void updateStats() {
|
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()) {
|
for (StatType stat : StatType.values()) {
|
||||||
StatInstance instance = getMap().getInstance(stat.name());
|
StatInstance instance = getMap().getInstance(stat.name());
|
||||||
|
Loading…
Reference in New Issue
Block a user