Skip to content

Commit

Permalink
Add additional log messages for BungeeCord sync
Browse files Browse the repository at this point in the history
  • Loading branch information
GeorgH93 committed Feb 5, 2024
1 parent 2452f71 commit baf2f32
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,11 @@ public PluginChannelCommunicator(MarriageMaster plugin)
plugin.getServer().getMessenger().registerIncomingPluginChannel(plugin, CHANNEL_MARRIAGE_MASTER, this);

setServerName(plugin.getConfiguration().getServerName());

if (serverName == null) logger.info("Server name not yet known. Waiting for initial sync.");
else logger.info("Last known server name: " + serverName);

logger.info("BungeeCord data sync handler initialized.");
}

@Override
Expand Down Expand Up @@ -220,7 +225,7 @@ private void performSendMessage(String channel, byte[] data)
}
else
{
logger.warning("Failed to send PluginMessage, there is no player online!");
logger.severe("Failed to send PluginMessage, there is no player online!");
}
}
//endregion
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2022 GeorgH93
* Copyright (C) 2024 GeorgH93
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Expand Down Expand Up @@ -53,6 +53,8 @@ public PluginChannelCommunicator(MarriageMaster plugin)
sendMessage(buildStringMessage("UseUUIDs", "true"), true);
sendMessage(buildStringMessage("UseUUIDSeparators", plugin.getConfig().useUUIDSeparators() + ""), true);
sendMessage(buildStringMessage("UUID_Type", plugin.getConfig().useOnlineUUIDs() ? "online" : "offline"), true);

logger.info("BungeeCord data sync handler initialized.");
}

public void setHomeCommand(HomeCommand home)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,10 @@ public DatabaseBackend<MARRIAGE_PLAYER_DATA, MARRIAGE_DATA, HOME> getDatabaseBac
logger.severe("The used database does not support multi-server setups! Please consider switching to MySQL!");
}
}
else if (bungee)
{
logger.info("Database is ready for BungeeCord setup.");
}
db.startup();
return db;
}
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<packaging>pom</packaging>

<properties>
<revision>2.7.3</revision>
<revision>2.7.4-SNAPSHOT</revision>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<bukkitVersion>1.15.2-R0.1-SNAPSHOT</bukkitVersion>
Expand Down

0 comments on commit baf2f32

Please sign in to comment.