TF-EssentialsX/Essentials/src/com/earth2me/essentials/commands/Commandfireball.java

24 lines
633 B
Java
Raw Normal View History

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
{
final Vector direction = user.getEyeLocation().getDirection().multiply(2);
user.getWorld().spawn(user.getEyeLocation().add(direction.getX(), direction.getY(), direction.getZ()), Fireball.class);
}
}