mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2025-02-12 04:20:41 +00:00
New command /fireball
This commit is contained in:
parent
c378d98b0f
commit
efaed85188
2 changed files with 28 additions and 0 deletions
|
@ -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 a new issue