1
0
mirror of https://github.com/nkomarn/harbor.git synced 2024-11-16 07:05:22 +01:00

🔨 Actually make config checker work as intended

Don't spam it on every player join. I had no brain. This is bad.
This commit is contained in:
Mykyta 2020-05-06 07:05:55 -07:00
parent 3b137b1dad
commit 8ade4db803
No known key found for this signature in database
GPG Key ID: C147E30C19EA3570

View File

@ -10,9 +10,10 @@ public class PlayerListener implements Listener {
@EventHandler @EventHandler
public void onPlayerJoin(final PlayerJoinEvent event) { public void onPlayerJoin(final PlayerJoinEvent event) {
if (event.getPlayer().hasPermission("harbor.admin")) { if (event.getPlayer().hasPermission("harbor.admin")) {
event.getPlayer().sendMessage(ChatColor.translateAlternateColorCodes('&', String.format( if (!Config.getString("version").equals("1.6.2")) event.getPlayer().sendMessage(
"%sYour Harbor configuration is outdated- please regenerate it or Harbor may not work properly.", ChatColor.translateAlternateColorCodes('&', String.format(
Config.getString("messages.miscellaneous.prefix") // Use old prefix location "%sYour Harbor configuration is outdated- please regenerate it or Harbor may not work properly.",
Config.getString("messages.miscellaneous.prefix") // Use old prefix location
))); )));
} }
} }