Skip to content

Commit

Permalink
More logging regarding server name updates
Browse files Browse the repository at this point in the history
  • Loading branch information
GeorgH93 committed Feb 5, 2024
1 parent baf2f32 commit 46873fb
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,14 @@ protected void receiveUnknownChannel(@NotNull String channel, byte[] bytes)
String server = in.readUTF();
if(!server.equals(serverName)) // Only save if the name of the server has changed
{
logger.info("Updating server name to: " + server);
setServerName(server);
plugin.getConfiguration().setServerName(server);
}
else
{
logger.info("Server name already up to date.");
}
serverNameUpdated = true;
}
}
Expand Down Expand Up @@ -191,6 +196,7 @@ public void onPlayerLoginEvent(PlayerJoinEvent event)
{
if(!serverNameUpdated)
{
logger.info("Request server name from BungeeCord ...");
sendMessage(CHANNEL_BUNGEE_CORD, buildStringMessage("GetServer"));
}
// If the server is empty and a player joins the server we have to do a re-sync
Expand Down

0 comments on commit 46873fb

Please sign in to comment.