diff --git a/src/main/java/me/lrxh/practice/Practice.java b/src/main/java/me/lrxh/practice/Practice.java index 0f7f940..3b56260 100644 --- a/src/main/java/me/lrxh/practice/Practice.java +++ b/src/main/java/me/lrxh/practice/Practice.java @@ -165,7 +165,7 @@ public void onEnable() { Console.sendMessage(CC.translate("&aRegistering placeholders")); } Plugin advancedReplays = getServer().getPluginManager().getPlugin("AdvancedReplay"); - if (advancedReplays != null) { + if (advancedReplays != null && advancedReplays.isEnabled()) { replay = true; Console.sendMessage(CC.translate("&aAdvancedReplay found!")); } diff --git a/src/main/java/me/lrxh/practice/match/Match.java b/src/main/java/me/lrxh/practice/match/Match.java index 8d8f35d..a56610d 100644 --- a/src/main/java/me/lrxh/practice/match/Match.java +++ b/src/main/java/me/lrxh/practice/match/Match.java @@ -307,17 +307,18 @@ public void end() { for (Player participant : getPlayers()) { if (participant != null && participant.isOnline()) { - - for (String msg : Locale.MATCH_SHOW_REPLAY.formatLines(participant)) { - if (msg.contains("%CLICKABLE%")) { - ChatComponentBuilder builder = new ChatComponentBuilder(Locale.MATCH_SHOW_REPLAY_RECEIVED_CLICKABLE.format(participant - )); - builder.attachToEachPart(ChatHelper.click("/replay play " + participant.getUniqueId())); - builder.attachToEachPart(ChatHelper.hover(Locale.MATCH_SHOW_REPLAY_HOVER.format(participant))); - - participant.sendMessage(builder.create()); - } else { - participant.sendMessage(msg); + if (Practice.getInstance().isReplay()){ + for (String msg : Locale.MATCH_SHOW_REPLAY.formatLines(participant)) { + if (msg.contains("%CLICKABLE%")) { + ChatComponentBuilder builder = new ChatComponentBuilder(Locale.MATCH_SHOW_REPLAY_RECEIVED_CLICKABLE.format(participant + )); + builder.attachToEachPart(ChatHelper.click("/replay play " + participant.getUniqueId())); + builder.attachToEachPart(ChatHelper.hover(Locale.MATCH_SHOW_REPLAY_HOVER.format(participant))); + + participant.sendMessage(builder.create()); + } else { + participant.sendMessage(msg); + } } } }