diff --git a/src/main/java/land/chipmunk/chipmunkbot/Client.java b/src/main/java/land/chipmunk/chipmunkbot/Client.java index fcff9e6..e0f5a6a 100644 --- a/src/main/java/land/chipmunk/chipmunkbot/Client.java +++ b/src/main/java/land/chipmunk/chipmunkbot/Client.java @@ -29,8 +29,6 @@ public class Client { final Session session = new TcpClientSession(options.host(), options.port(), options.protocol(), options.proxy()); this.session = session; - session.connect(); - session.addListener(new SessionAdapter () { @Override public void packetReceived(Session session, Packet packet) { for (SessionListener listener : listeners) listener.packetReceived(session, packet); } @Override public void packetSending (PacketSendingEvent event) { for (SessionListener listener : listeners) listener.packetSending(event); } @@ -55,6 +53,8 @@ public class Client { new Timer().schedule(task, options.reconnectDelay()); } }); + + session.connect(); } public long reconnectDelay () { return options.reconnectDelay(); } diff --git a/src/main/java/land/chipmunk/chipmunkbot/song/NBSConverter.java b/src/main/java/land/chipmunk/chipmunkbot/song/NBSConverter.java index 6cf5f1a..2e5083e 100644 --- a/src/main/java/land/chipmunk/chipmunkbot/song/NBSConverter.java +++ b/src/main/java/land/chipmunk/chipmunkbot/song/NBSConverter.java @@ -164,7 +164,7 @@ public class NBSConverter { if (index >= customInstruments.size()) continue; NBSCustomInstrument customInstrument = customInstruments.get(index); instrument = Instrument.of(customInstrument.name); - key += customInstrument.pitch; + // key += customInstrument.pitch; } if (key < 33 || key > 57) {