mirror of
https://github.com/EssentialsX/Essentials.git
synced 2024-12-26 19:18:29 +01:00
New command /fireball
This commit is contained in:
parent
c378d98b0f
commit
efaed85188
@ -0,0 +1,24 @@
|
||||
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
|
||||
{
|
||||
charge(user);
|
||||
final Vector direction = user.getEyeLocation().getDirection().multiply(2);
|
||||
user.getWorld().spawn(user.getEyeLocation().add(direction.getX(), direction.getY(), direction.getZ()), Fireball.class);
|
||||
}
|
||||
}
|
@ -76,6 +76,10 @@ commands:
|
||||
description: Extinguish players.
|
||||
usage: /<command> <player>
|
||||
aliases: [extinguish]
|
||||
fireball:
|
||||
description: Throw a fireball.
|
||||
usage: /<command>
|
||||
aliases: [efireball]
|
||||
getpos:
|
||||
description: Get your current coordinates.
|
||||
usage: /<command>
|
||||
|
Loading…
Reference in New Issue
Block a user