summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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.