From 54fa20cdb59cda4d739d10176fb00bcba76f196c Mon Sep 17 00:00:00 2001 From: Brianna Date: Tue, 21 May 2019 03:07:01 -0400 Subject: [PATCH] Vanish fix. --- .../ultimatemoderation/command/commands/CommandVanish.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/songoda/ultimatemoderation/command/commands/CommandVanish.java b/src/main/java/com/songoda/ultimatemoderation/command/commands/CommandVanish.java index a5a2586..f28f52b 100644 --- a/src/main/java/com/songoda/ultimatemoderation/command/commands/CommandVanish.java +++ b/src/main/java/com/songoda/ultimatemoderation/command/commands/CommandVanish.java @@ -42,13 +42,13 @@ public class CommandVanish extends AbstractCommand { if (inVanish.contains(uuid)) { inVanish.remove(uuid); + player.setInvulnerable(false); player.setCanPickupItems(true); - player.setInvulnerable(true); player.sendMessage(Methods.formatText(instance.getReferences().getPrefix() + instance.getLocale().getMessage("command.vanish.toggledOff"))); } else { inVanish.add(uuid); player.setCanPickupItems(false); - player.setInvulnerable(false); + player.setInvulnerable(true); player.sendMessage(Methods.formatText(instance.getReferences().getPrefix() + instance.getLocale().getMessage("command.vanish.toggledOn"))); } if (SettingsManager.Setting.VANISH_EFFECTS.getBoolean()) {