summaryrefslogtreecommitdiffstats
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
commit8c478c76a51d53abc214d170294773377987fcac (patch)
treeff053acfa2cb3d9390a4ff84cc1fb4742a1673cd
parent293f2f7cd28ea69ad34aa4cce4e61369ce49ad99 (diff)
downloadEssentials-8c478c76a51d53abc214d170294773377987fcac.tar
Essentials-8c478c76a51d53abc214d170294773377987fcac.tar.gz
Essentials-8c478c76a51d53abc214d170294773377987fcac.tar.lz
Essentials-8c478c76a51d53abc214d170294773377987fcac.tar.xz
Essentials-8c478c76a51d53abc214d170294773377987fcac.zip
Added option to /fireball command: /fireball small
-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.