diff --git a/src/main/java/net/rptools/maptool/client/MapTool.java b/src/main/java/net/rptools/maptool/client/MapTool.java index 68e3cd98f3..b0f17de4c6 100644 --- a/src/main/java/net/rptools/maptool/client/MapTool.java +++ b/src/main/java/net/rptools/maptool/client/MapTool.java @@ -185,7 +185,7 @@ public class MapTool { var campaign = CampaignFactory.createBasicCampaign(); var policy = new ServerPolicy(); - server = new MapToolServer("", new Campaign(campaign), null, false, policy, playerDB); + server = new MapToolServer(null, new Campaign(campaign), null, false, policy, playerDB); client = new MapToolClient(server, campaign, playerDB.getPlayer(), connections.clientSide()); } catch (NoSuchAlgorithmException | InvalidKeySpecException e) { throw new RuntimeException("Unable to create default personal server", e); diff --git a/src/main/java/net/rptools/maptool/server/MapToolServer.java b/src/main/java/net/rptools/maptool/server/MapToolServer.java index 68925dda05..b93657fbeb 100644 --- a/src/main/java/net/rptools/maptool/server/MapToolServer.java +++ b/src/main/java/net/rptools/maptool/server/MapToolServer.java @@ -91,7 +91,7 @@ public enum State { private State currentState; public MapToolServer( - String id, + @Nullable String id, Campaign campaign, @Nullable ServerConfig config, boolean useUPnP, @@ -103,7 +103,7 @@ public MapToolServer( this.playerDatabase = playerDb; this.announcer = - config == null + config == null || id == null ? null : new ServiceAnnouncer(id, config.getPort(), AppConstants.SERVICE_GROUP);