mirror of
https://github.com/BentoBoxWorld/BentoBox.git
synced 2025-01-14 04:02:01 +01:00
Switched to Java 10
Maven shade plugin and javadoc plugins have issues with Java 10 so those are currently commented out. BStats cannot work because shade plugin is not shading. Shade plugin is fixed in snapshots, but not in Maven Central yet.
This commit is contained in:
parent
4203ce85b4
commit
95f8c81963
12
pom.xml
12
pom.xml
@ -43,7 +43,7 @@
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
||||
<java.version>1.8</java.version>
|
||||
<java.version>1.10</java.version>
|
||||
<powermock.version>1.7.4</powermock.version>
|
||||
</properties>
|
||||
|
||||
@ -126,7 +126,7 @@
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<version>3.7.0</version>
|
||||
<version>3.8.0</version>
|
||||
<configuration>
|
||||
<source>${java.version}</source>
|
||||
<target>${java.version}</target>
|
||||
@ -142,6 +142,7 @@
|
||||
<artifactId>maven-jar-plugin</artifactId>
|
||||
<version>3.1.0</version>
|
||||
</plugin>
|
||||
<!--
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-javadoc-plugin</artifactId>
|
||||
@ -159,7 +160,7 @@
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugin> -->
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-source-plugin</artifactId>
|
||||
@ -173,10 +174,11 @@
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<!--
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-shade-plugin</artifactId>
|
||||
<version>3.1.0</version>
|
||||
<version>3.2.0</version>
|
||||
<configuration>
|
||||
<minimizeJar>true</minimizeJar>
|
||||
<relocations>
|
||||
@ -199,7 +201,7 @@
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugin> -->
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-install-plugin</artifactId>
|
||||
|
@ -130,11 +130,12 @@ public class BentoBox extends JavaPlugin {
|
||||
instance.log("#############################################");
|
||||
|
||||
// Load metrics
|
||||
/*
|
||||
if (settings.isMetrics()) {
|
||||
BStats bStats = new BStats(this);
|
||||
bStats.registerMetrics();
|
||||
}
|
||||
|
||||
*/
|
||||
// Fire plugin ready event
|
||||
Bukkit.getServer().getPluginManager().callEvent(new BentoBoxReadyEvent());
|
||||
});
|
||||
|
@ -113,20 +113,24 @@ public class AddonClassLoader extends URLClassLoader {
|
||||
if (name.startsWith("world.bentobox.bentobox")) {
|
||||
return null;
|
||||
}
|
||||
Class<?> result = classes.get(name);
|
||||
if (result == null) {
|
||||
if (checkGlobal) {
|
||||
result = loader.getClassByName(name);
|
||||
}
|
||||
|
||||
Class<?> result = classes.computeIfAbsent(name, k -> {
|
||||
if (checkGlobal && loader.getClassByName(name) != null) {
|
||||
return loader.getClassByName(name);
|
||||
} else {
|
||||
if (result == null) {
|
||||
try {
|
||||
return super.findClass(name);
|
||||
result = super.findClass(name);
|
||||
} catch (ClassNotFoundException e) {
|
||||
return null;
|
||||
result = null;
|
||||
}
|
||||
if (result != null) {
|
||||
loader.setClass(name, result);
|
||||
|
||||
}
|
||||
}
|
||||
});
|
||||
if (result != null) {
|
||||
loader.setClass(name, result);
|
||||
classes.put(name, result);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user