From 8ade4db803d04f969fce4dbb7f64a4077d0515b0 Mon Sep 17 00:00:00 2001 From: Mykyta Date: Wed, 6 May 2020 07:05:55 -0700 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A8=20Actually=20make=20config=20check?= =?UTF-8?q?er=20work=20as=20intended=20Don't=20spam=20it=20on=20every=20pl?= =?UTF-8?q?ayer=20join.=20I=20had=20no=20brain.=20This=20is=20bad.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/xyz/nkomarn/Harbor/listener/PlayerListener.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/main/java/xyz/nkomarn/Harbor/listener/PlayerListener.java b/src/main/java/xyz/nkomarn/Harbor/listener/PlayerListener.java index 74e6779..1ee3999 100644 --- a/src/main/java/xyz/nkomarn/Harbor/listener/PlayerListener.java +++ b/src/main/java/xyz/nkomarn/Harbor/listener/PlayerListener.java @@ -10,9 +10,10 @@ public class PlayerListener implements Listener { @EventHandler public void onPlayerJoin(final PlayerJoinEvent event) { if (event.getPlayer().hasPermission("harbor.admin")) { - event.getPlayer().sendMessage(ChatColor.translateAlternateColorCodes('&', String.format( - "%sYour Harbor configuration is outdated- please regenerate it or Harbor may not work properly.", - Config.getString("messages.miscellaneous.prefix") // Use old prefix location + if (!Config.getString("version").equals("1.6.2")) event.getPlayer().sendMessage( + ChatColor.translateAlternateColorCodes('&', String.format( + "%sYour Harbor configuration is outdated- please regenerate it or Harbor may not work properly.", + Config.getString("messages.miscellaneous.prefix") // Use old prefix location ))); } }