diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandlightning.java b/Essentials/src/com/earth2me/essentials/commands/Commandlightning.java index 6476771cb..1520fe8ba 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandlightning.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandlightning.java @@ -1,9 +1,8 @@ package com.earth2me.essentials.commands; import com.earth2me.essentials.Essentials; +import com.earth2me.essentials.TargetBlock; import com.earth2me.essentials.User; -import java.util.List; - import org.bukkit.Server; import org.bukkit.World; import org.bukkit.entity.Player; @@ -20,13 +19,14 @@ public class Commandlightning extends EssentialsCommand public void run(Server server, Essentials parent, User user, String commandLabel, String[] args) throws Exception { + World world = user.getWorld(); if (args.length < 1) { - user.sendMessage("§cUsage: /" + commandLabel + " [player]"); + world.strikeLightning(user.getTargetBlock(null, 600).getLocation()); + user.sendMessage("§7CRACK"); return; } - World world = user.getWorld(); if(server.matchPlayer(args[0]).isEmpty()) { user.sendMessage("§cPlayer not found"); @@ -35,9 +35,9 @@ public class Commandlightning extends EssentialsCommand for (Player p : server.matchPlayer(args[0])) { - user.sendMessage("§7Smiting" + p.getDisplayName()); + user.sendMessage("§7Smiting " + p.getDisplayName()); world.strikeLightning(p.getLocation()); - p.setHealth(p.getHealth() - 5); + p.setHealth(p.getHealth() < 5 ? 0 : p.getHealth() -5); p.sendMessage("§7You have just been smited"); } user.charge(this); diff --git a/Essentials/src/plugin.yml b/Essentials/src/plugin.yml index 788842261..d2c4e2925 100644 --- a/Essentials/src/plugin.yml +++ b/Essentials/src/plugin.yml @@ -145,8 +145,8 @@ commands: usage: / aliases: [playerlist,who,online,elist] lightning: - description: Smite down players with the power of Thor, will take 5 hearts - usage: / [player] + description: Command the power of Thor. Look and strike or pass a player args. + usage: / mail: description: Manages inter-player, intra-server mail. usage: / [read|clear|send [to] [message]]