2011-06-23 12:14:24 +00:00
|
|
|
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
|
|
|
|
{
|
2011-11-18 12:06:59 +00:00
|
|
|
final Vector direction = user.getEyeLocation().getDirection().multiply(2);
|
2011-06-23 12:14:24 +00:00
|
|
|
user.getWorld().spawn(user.getEyeLocation().add(direction.getX(), direction.getY(), direction.getZ()), Fireball.class);
|
|
|
|
}
|
|
|
|
}
|