forked from SteamWar/SteamWar
Fix VelocityCore
This commit is contained in:
@@ -82,7 +82,7 @@ public abstract class AbstractLinker<T> {
|
||||
try {
|
||||
any = clazz.newInstance();
|
||||
} catch (InstantiationException | IllegalAccessException e) {
|
||||
throw new SecurityException(e.getMessage());
|
||||
throw new SecurityException(e.getMessage(), e);
|
||||
}
|
||||
instances.put(clazz, any);
|
||||
|
||||
@@ -104,7 +104,7 @@ public abstract class AbstractLinker<T> {
|
||||
try {
|
||||
field.set(o, instances.get(field.getType()));
|
||||
} catch (IllegalAccessException e) {
|
||||
throw new SecurityException(e);
|
||||
throw new SecurityException(e.getMessage(), e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -32,6 +32,9 @@ java {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compileOnly(libs.classindex)
|
||||
annotationProcessor(libs.classindex)
|
||||
|
||||
annotationProcessor(libs.velocityapi)
|
||||
compileOnly(libs.velocity)
|
||||
compileOnly(libs.viaapi)
|
||||
|
||||
@@ -28,7 +28,7 @@ import java.util.concurrent.TimeUnit;
|
||||
|
||||
@Linked
|
||||
@EventMode(false)
|
||||
class Broadcaster {
|
||||
public class Broadcaster {
|
||||
|
||||
private final List<String> broadcasts = VelocityCore.get().getConfig().getBroadcasts();
|
||||
private int lastBroadCast = 0;
|
||||
|
||||
@@ -167,7 +167,8 @@ public class VelocityCore implements ReloadablePlugin {
|
||||
try {
|
||||
linker.link();
|
||||
} catch (AbstractLinker.LinkException e) {
|
||||
VelocityCore.getProxy().shutdown();
|
||||
logger.log(Level.SEVERE, e.getMessage(), e);
|
||||
getProxy().shutdown();
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -19,19 +19,13 @@
|
||||
|
||||
package de.steamwar.velocitycore.commands;
|
||||
|
||||
import de.steamwar.linkage.EventMode;
|
||||
import de.steamwar.linkage.Linked;
|
||||
import de.steamwar.linkage.LinkedInstance;
|
||||
import de.steamwar.velocitycore.*;
|
||||
import de.steamwar.velocitycore.inventory.SWInventory;
|
||||
import de.steamwar.velocitycore.inventory.SWItem;
|
||||
import de.steamwar.velocitycore.network.NetworkSender;
|
||||
import de.steamwar.velocitycore.util.BauLock;
|
||||
import de.steamwar.velocitycore.util.BauLockState;
|
||||
import de.steamwar.command.PreviousArguments;
|
||||
import de.steamwar.command.SWCommand;
|
||||
import de.steamwar.command.TypeMapper;
|
||||
import de.steamwar.command.TypeValidator;
|
||||
import de.steamwar.linkage.EventMode;
|
||||
import de.steamwar.linkage.Linked;
|
||||
import de.steamwar.linkage.LinkedInstance;
|
||||
import de.steamwar.messages.Chatter;
|
||||
import de.steamwar.messages.Message;
|
||||
import de.steamwar.messages.PlayerChatter;
|
||||
@@ -39,6 +33,12 @@ import de.steamwar.network.packets.server.BaumemberUpdatePacket;
|
||||
import de.steamwar.persistent.Bauserver;
|
||||
import de.steamwar.sql.BauweltMember;
|
||||
import de.steamwar.sql.SteamwarUser;
|
||||
import de.steamwar.velocitycore.*;
|
||||
import de.steamwar.velocitycore.inventory.SWInventory;
|
||||
import de.steamwar.velocitycore.inventory.SWItem;
|
||||
import de.steamwar.velocitycore.network.NetworkSender;
|
||||
import de.steamwar.velocitycore.util.BauLock;
|
||||
import de.steamwar.velocitycore.util.BauLockState;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.function.Consumer;
|
||||
@@ -50,9 +50,8 @@ public class BauCommand extends SWCommand {
|
||||
@LinkedInstance
|
||||
private HelpCommand command;
|
||||
|
||||
public BauCommand(HelpCommand command) {
|
||||
public BauCommand() {
|
||||
super("bau", "b", "build", "gs");
|
||||
this.command = command;
|
||||
}
|
||||
|
||||
@Register(noTabComplete = true)
|
||||
|
||||
Reference in New Issue
Block a user