Skip to content

Commit

Permalink
optimize imports, return if query failed to start
Browse files Browse the repository at this point in the history
  • Loading branch information
KurtThiemann committed Sep 18, 2023
1 parent 19a185f commit 69985c6
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ buildscript {

apply plugin: 'foxloader.dev'

version '1.2.1'
version '1.2.2'

foxloader {
// forceReload = true
Expand Down
4 changes: 2 additions & 2 deletions src/server/java/io/thiemann/kurt/query/QueryModServer.java
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
package io.thiemann.kurt.query;

import com.fox2code.foxloader.loader.ModLoader;
import io.thiemann.kurt.query.query.QueryServer;
import com.fox2code.foxloader.loader.ServerMod;
import com.fox2code.foxloader.network.NetworkPlayer;
import io.thiemann.kurt.query.query.QueryServer;
import net.minecraft.server.MinecraftServer;
import net.minecraft.src.server.PropertyManager;

Expand Down Expand Up @@ -42,6 +41,7 @@ public void onServerStart(NetworkPlayer.ConnectionType connectionType) {
this.queryServer = new QueryServer(server, queryPort, inetAddress);
} catch (SocketException e) {
getLogger().warning("Failed to start query server on " + queryAddressString + ":" + queryPort);
return;
}

getLogger().info("Query server started on " + queryAddressString + ":" + queryPort);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package io.thiemann.kurt.query.query;

import io.thiemann.kurt.query.query.packet.*;

import java.io.IOException;
import java.net.*;
import java.util.Map;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
import com.fox2code.foxloader.loader.ModLoader;
import com.fox2code.foxloader.network.NetworkPlayer;
import net.minecraft.server.MinecraftServer;
import java.net.*;

import java.net.InetAddress;
import java.net.SocketException;
import java.util.Collection;


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import java.nio.Buffer;
import java.nio.ByteBuffer;
import java.nio.ByteOrder;
import java.nio.charset.StandardCharsets;

public class ClientBoundBasicStatPacket extends ClientBoundPacket {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import java.nio.Buffer;
import java.nio.ByteBuffer;
import java.nio.charset.StandardCharsets;

public class ClientBoundFullStatPacket extends ClientBoundPacket {

Expand Down

0 comments on commit 69985c6

Please sign in to comment.