From 4af9da10c5bd686e05ed463420f78ceb06ac4e12 Mon Sep 17 00:00:00 2001 From: libraryaddict Date: Tue, 4 Feb 2020 16:06:34 +1300 Subject: [PATCH] Fix retaliation combat and make the message nicer to see --- .../java/me/libraryaddict/disguise/DisguiseListener.java | 8 +++----- .../disguise/utilities/translations/LibsMsg.java | 2 +- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/main/java/me/libraryaddict/disguise/DisguiseListener.java b/src/main/java/me/libraryaddict/disguise/DisguiseListener.java index 06d7a596..730682a0 100644 --- a/src/main/java/me/libraryaddict/disguise/DisguiseListener.java +++ b/src/main/java/me/libraryaddict/disguise/DisguiseListener.java @@ -245,7 +245,7 @@ public class DisguiseListener implements Listener { if (!attacker.hasPermission("libsdisguises." + (pvp ? "pvp" : "pve")) && !attacker.hasPermission("libsdisguises." + (pvp ? "pvp" : "pve"))) { - if (!DisguiseConfig.isRetaliationCombat() || !canRetaliate(event.getEntity())) { + if (!DisguiseConfig.isRetaliationCombat() || !canRetaliate(attacker)) { Disguise[] disguises = DisguiseAPI.getDisguises(attacker); if (disguises.length > 0) { @@ -273,10 +273,8 @@ public class DisguiseListener implements Listener { } if (!event.isCancelled() && DisguiseConfig.isRetaliationCombat()) { - if (canRetaliate(event.getEntity())) { - setRetaliation(event.getEntity()); - setRetaliation(attacker); - } + setRetaliation(event.getEntity()); + setRetaliation(attacker); } } diff --git a/src/main/java/me/libraryaddict/disguise/utilities/translations/LibsMsg.java b/src/main/java/me/libraryaddict/disguise/utilities/translations/LibsMsg.java index b7cd5204..1e158e06 100644 --- a/src/main/java/me/libraryaddict/disguise/utilities/translations/LibsMsg.java +++ b/src/main/java/me/libraryaddict/disguise/utilities/translations/LibsMsg.java @@ -245,7 +245,7 @@ public enum LibsMsg { ChatColor.GOLD + "Lib's Disguises permission check, success. Pig disguise should be usable!"), LIBS_PERM_CHECK_FAIL( ChatColor.GOLD + "Lib's Disguises permission check, fail. Your permission plugin isn't compliant!"), - CANT_ATTACK_DISGUISED(ChatColor.RED + "No PvP while disguised!"), + CANT_ATTACK_DISGUISED(ChatColor.RED + "Cannot fight while disguised!"), CANT_ATTACK_DISGUISED_RECENTLY(ChatColor.RED + "You were disguised recently! Can't attack yet!"), SWITCH_WORLD_DISGUISE_REMOVED(ChatColor.RED + "Disguise removed as you've switched worlds!"), ACTION_BAR_MESSAGE(ChatColor.GOLD + "Currently disguised as %s");