diff options
author | ementalo <ementalo@e251c2fe-e539-e718-e476-b85c1f46cddb> | 2011-04-27 00:16:23 +0000 |
---|---|---|
committer | ementalo <ementalo@e251c2fe-e539-e718-e476-b85c1f46cddb> | 2011-04-27 00:16:23 +0000 |
commit | 29869fa2644c20161b5be180b9a58d9ae739f943 (patch) | |
tree | 73997c837179d9f16a39a493f50910ba5029960c | |
parent | edc09047891d3e6f621b3958561fd82e3277b273 (diff) | |
download | Essentials-29869fa2644c20161b5be180b9a58d9ae739f943.tar Essentials-29869fa2644c20161b5be180b9a58d9ae739f943.tar.gz Essentials-29869fa2644c20161b5be180b9a58d9ae739f943.tar.lz Essentials-29869fa2644c20161b5be180b9a58d9ae739f943.tar.xz Essentials-29869fa2644c20161b5be180b9a58d9ae739f943.zip |
[trunk] lightning strikes where you look if you do not pass an arg. fixed health taking
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1282 e251c2fe-e539-e718-e476-b85c1f46cddb
-rw-r--r-- | Essentials/src/com/earth2me/essentials/commands/Commandlightning.java | 12 | ||||
-rw-r--r-- | Essentials/src/plugin.yml | 4 |
2 files changed, 8 insertions, 8 deletions
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: /<command>
aliases: [playerlist,who,online,elist]
lightning:
- description: Smite down players with the power of Thor, will take 5 hearts
- usage: /<command> [player]
+ description: Command the power of Thor. Look and strike or pass a player args.
+ usage: /<command> <player>
mail:
description: Manages inter-player, intra-server mail.
usage: /<command> [read|clear|send [to] [message]]
|