mirror of
https://github.com/EssentialsX/Essentials.git
synced 2024-12-23 01:27:40 +01: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:
parent
df29d80e5d
commit
1f23740832
@ -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"));
|
||||
|
Loading…
Reference in New Issue
Block a user