Fix retaliation combat and make the message nicer to see

This commit is contained in:
libraryaddict 2020-02-04 16:06:34 +13:00
parent e2f80811ff
commit 4af9da10c5
No known key found for this signature in database
GPG Key ID: 052E4FBCD257AEA4
2 changed files with 4 additions and 6 deletions

View File

@ -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);
}
}

View File

@ -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");