Fixed some sponge issues

This commit is contained in:
Rsl1122 2018-04-13 10:30:57 +03:00
parent f1024f67c0
commit 3c81926ef8
5 changed files with 22 additions and 5 deletions

View File

@ -62,6 +62,15 @@
<exclude>junit:*</exclude>
</excludes>
</artifactSet>
<relocations>
<relocation>
<pattern>org.apache</pattern>
<shadedPattern>plan.org.apache</shadedPattern>
<excludes>
<exclude>org.apache.logging.*</exclude>
</excludes>
</relocation>
</relocations>
</configuration>
</plugin>
<plugin>
@ -260,7 +269,7 @@
<dependency>
<groupId>org.spongepowered</groupId>
<artifactId>spongeapi</artifactId>
<version>7.0.0</version>
<version>LATEST</version>
<scope>provided</scope>
<exclusions>
<exclusion>

View File

@ -70,7 +70,7 @@
<dependency>
<groupId>org.spongepowered</groupId>
<artifactId>spongeapi</artifactId>
<version>7.0.0</version>
<version>LATEST</version>
<type>jar</type>
<scope>provided</scope>
</dependency>
@ -195,6 +195,9 @@
<relocation>
<pattern>org.apache</pattern>
<shadedPattern>plan.org.apache</shadedPattern>
<excludes>
<exclude>org.apache.logging.*</exclude>
</excludes>
</relocation>
</relocations>
</configuration>

View File

@ -50,6 +50,10 @@ public class ManageConDebugCommand extends CommandNode {
try {
List<Server> servers = Database.getActive().fetch().getServers();
if (servers.isEmpty()) {
sender.sendMessage("§cNo Servers found in the database.");
}
String accessAddress = WebServerSystem.getInstance().getWebServer().getAccessAddress();
UUID thisServer = ServerInfo.getServerUUID();
for (Server server : servers) {

View File

@ -50,7 +50,8 @@ public abstract class DBSystem implements SubSystem {
Benchmark.stop("Enable", "Init Database");
} catch (DBInitException e) {
Throwable cause = e.getCause();
throw new EnableException(db.getName() + " init failure: " + cause.getMessage(), cause);
String message = cause == null ? e.getMessage() : cause.getMessage();
throw new EnableException((db != null ? db.getName() : "Database") + " init failure: " + message, cause);
}
}

View File

@ -4,7 +4,7 @@
*/
package com.djrapitops.plan.system.info.request;
import com.djrapitops.plan.Plan;
import com.djrapitops.plan.PlanPlugin;
import com.djrapitops.plan.api.exceptions.connection.BadRequestException;
import com.djrapitops.plan.api.exceptions.connection.WebException;
import com.djrapitops.plan.system.settings.Settings;
@ -64,7 +64,7 @@ public class SaveDBSettingsRequest extends InfoRequestWithVariables implements S
Log.info("----------------------------------");
return DefaultResponses.SUCCESS.get();
} finally {
Plan.getInstance().reloadPlugin(true);
PlanPlugin.getInstance().reloadPlugin(true);
}
}