mirror of
https://github.com/essentials/Essentials.git
synced 2025-08-09 08:06:54 +02:00
Don't hurt god players with lightning.
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1516 e251c2fe-e539-e718-e476-b85c1f46cddb
This commit is contained in:
@@ -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());
|
||||
if (!ess.getUser(p).isGodModeEnabled()) {
|
||||
p.setHealth(p.getHealth() < 5 ? 0 : p.getHealth() - 5);
|
||||
}
|
||||
if (ess.getSettings().warnOnSmite())
|
||||
{
|
||||
p.sendMessage(Util.i18n("lightningSmited"));
|
||||
|
Reference in New Issue
Block a user