diff options
author | snowleo <schneeleo@gmail.com> | 2011-06-23 14:14:24 +0200 |
---|---|---|
committer | snowleo <schneeleo@gmail.com> | 2011-06-23 14:14:24 +0200 |
commit | efaed85188bb5515e2d88fdaf761e3f841bbba70 (patch) | |
tree | 1f366369a6cf23dc0273dd82703ced541659938a | |
parent | c378d98b0f30812d0b5f22a92a6675a78e9670a0 (diff) | |
download | Essentials-efaed85188bb5515e2d88fdaf761e3f841bbba70.tar Essentials-efaed85188bb5515e2d88fdaf761e3f841bbba70.tar.gz Essentials-efaed85188bb5515e2d88fdaf761e3f841bbba70.tar.lz Essentials-efaed85188bb5515e2d88fdaf761e3f841bbba70.tar.xz Essentials-efaed85188bb5515e2d88fdaf761e3f841bbba70.zip |
New command /fireball
-rw-r--r-- | Essentials/src/com/earth2me/essentials/commands/Commandfireball.java | 24 | ||||
-rw-r--r-- | Essentials/src/plugin.yml | 4 |
2 files changed, 28 insertions, 0 deletions
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandfireball.java b/Essentials/src/com/earth2me/essentials/commands/Commandfireball.java new file mode 100644 index 000000000..73c314935 --- /dev/null +++ b/Essentials/src/com/earth2me/essentials/commands/Commandfireball.java @@ -0,0 +1,24 @@ +package com.earth2me.essentials.commands; + +import com.earth2me.essentials.User; +import org.bukkit.Server; +import org.bukkit.entity.Fireball; +import org.bukkit.util.Vector; + + +public class Commandfireball extends EssentialsCommand +{ + + public Commandfireball() + { + super("fireball"); + } + + @Override + protected void run(final Server server, final User user, final String commandLabel, final String[] args) throws Exception + { + charge(user); + final Vector direction = user.getEyeLocation().getDirection().multiply(2); + user.getWorld().spawn(user.getEyeLocation().add(direction.getX(), direction.getY(), direction.getZ()), Fireball.class); + } +} diff --git a/Essentials/src/plugin.yml b/Essentials/src/plugin.yml index 6c26d8cb2..68a7b8b30 100644 --- a/Essentials/src/plugin.yml +++ b/Essentials/src/plugin.yml @@ -76,6 +76,10 @@ commands: description: Extinguish players.
usage: /<command> <player>
aliases: [extinguish]
+ fireball:
+ description: Throw a fireball.
+ usage: /<command>
+ aliases: [efireball]
getpos:
description: Get your current coordinates.
usage: /<command>
|