summaryrefslogtreecommitdiffstats
path: root/Essentials
diff options
context:
space:
mode:
authorsnowleo <schneeleo@gmail.com>2011-11-20 14:34:03 +0100
committersnowleo <schneeleo@gmail.com>2011-11-20 14:34:03 +0100
commit15df345bf2770ec650a4acec34d2372a287c0f4d (patch)
tree3705f457035a495c4796e37332e733a22a494780 /Essentials
parent437fab8b0454fbd6468425ad579ef6b7dce835b4 (diff)
downloadEssentials-15df345bf2770ec650a4acec34d2372a287c0f4d.tar
Essentials-15df345bf2770ec650a4acec34d2372a287c0f4d.tar.gz
Essentials-15df345bf2770ec650a4acec34d2372a287c0f4d.tar.lz
Essentials-15df345bf2770ec650a4acec34d2372a287c0f4d.tar.xz
Essentials-15df345bf2770ec650a4acec34d2372a287c0f4d.zip
Added option to /fireball command: /fireball small
Diffstat (limited to 'Essentials')
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandfireball.java8
-rw-r--r--Essentials/src/plugin.yml2
2 files changed, 8 insertions, 2 deletions
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandfireball.java b/Essentials/src/com/earth2me/essentials/commands/Commandfireball.java
index 0dc78474b..8bb172a29 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandfireball.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandfireball.java
@@ -3,6 +3,7 @@ package com.earth2me.essentials.commands;
import com.earth2me.essentials.User;
import org.bukkit.Server;
import org.bukkit.entity.Fireball;
+import org.bukkit.entity.SmallFireball;
import org.bukkit.util.Vector;
@@ -16,7 +17,12 @@ public class Commandfireball extends EssentialsCommand
@Override
protected void run(final Server server, final User user, final String commandLabel, final String[] args) throws Exception
{
+ boolean small = false;
+ if (args.length > 0 && args[0].equalsIgnoreCase("small"))
+ {
+ small = true;
+ }
final Vector direction = user.getEyeLocation().getDirection().multiply(2);
- user.getWorld().spawn(user.getEyeLocation().add(direction.getX(), direction.getY(), direction.getZ()), Fireball.class);
+ user.getWorld().spawn(user.getEyeLocation().add(direction.getX(), direction.getY(), direction.getZ()), small ? SmallFireball.class : Fireball.class);
}
}
diff --git a/Essentials/src/plugin.yml b/Essentials/src/plugin.yml
index dcbbfe767..e3f500b9e 100644
--- a/Essentials/src/plugin.yml
+++ b/Essentials/src/plugin.yml
@@ -88,7 +88,7 @@ commands:
aliases: [extinguish,eext,eextinguish]
fireball:
description: Throw a fireball.
- usage: /<command>
+ usage: /<command> [small]
aliases: [efireball]
gamemode:
description: Change player gamemode.