summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandlightning.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandlightning.java b/Essentials/src/com/earth2me/essentials/commands/Commandlightning.java
index 794fd81f1..c9135d61e 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandlightning.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandlightning.java
@@ -1,10 +1,8 @@
package com.earth2me.essentials.commands;
-import com.earth2me.essentials.Essentials;
import com.earth2me.essentials.User;
import com.earth2me.essentials.Util;
import org.bukkit.Server;
-import org.bukkit.World;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
@@ -46,7 +44,9 @@ public class Commandlightning extends EssentialsCommand
{
sender.sendMessage(Util.format("lightningUse", p.getDisplayName()));
p.getWorld().strikeLightning(p.getLocation());
- p.setHealth(p.getHealth() < 5 ? 0 : p.getHealth() - 5);
+ if (!ess.getUser(p).isGodModeEnabled()) {
+ p.setHealth(p.getHealth() < 5 ? 0 : p.getHealth() - 5);
+ }
if (ess.getSettings().warnOnSmite())
{
p.sendMessage(Util.i18n("lightningSmited"));