mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2025-08-03 02:55:46 +00:00
Reformat
This commit is contained in:
parent
ad13062117
commit
dde0b20775
380 changed files with 38917 additions and 46821 deletions
|
@ -6,53 +6,36 @@ import org.bukkit.entity.*;
|
|||
import org.bukkit.util.Vector;
|
||||
|
||||
|
||||
public class Commandfireball extends EssentialsCommand
|
||||
{
|
||||
public Commandfireball()
|
||||
{
|
||||
super("fireball");
|
||||
}
|
||||
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
|
||||
{
|
||||
Class<? extends Entity> type = Fireball.class;
|
||||
Projectile projectile;
|
||||
int speed = 2;
|
||||
if (args.length > 0)
|
||||
{
|
||||
if (args[0].equalsIgnoreCase("small"))
|
||||
{
|
||||
type = SmallFireball.class;
|
||||
}
|
||||
else if (args[0].equalsIgnoreCase("arrow"))
|
||||
{
|
||||
type = Arrow.class;
|
||||
}
|
||||
else if (args[0].equalsIgnoreCase("skull"))
|
||||
{
|
||||
type = WitherSkull.class;
|
||||
}
|
||||
else if (args[0].equalsIgnoreCase("egg"))
|
||||
{
|
||||
type = Egg.class;
|
||||
}
|
||||
else if(args[0].equalsIgnoreCase("snowball"))
|
||||
{
|
||||
type = Snowball.class;
|
||||
}
|
||||
else if(args[0].equalsIgnoreCase("expbottle"))
|
||||
{
|
||||
type = ThrownExpBottle.class;
|
||||
}
|
||||
else if(args[0].equalsIgnoreCase("large"))
|
||||
{
|
||||
type = LargeFireball.class;
|
||||
}
|
||||
}
|
||||
final Vector direction = user.getBase().getEyeLocation().getDirection().multiply(speed);
|
||||
projectile = (Projectile)user.getWorld().spawn(user.getBase().getEyeLocation().add(direction.getX(), direction.getY(), direction.getZ()), type);
|
||||
projectile.setShooter(user.getBase());
|
||||
projectile.setVelocity(direction);
|
||||
}
|
||||
@Override
|
||||
protected void run(final Server server, final User user, final String commandLabel, final String[] args) throws Exception {
|
||||
Class<? extends Entity> type = Fireball.class;
|
||||
Projectile projectile;
|
||||
int speed = 2;
|
||||
if (args.length > 0) {
|
||||
if (args[0].equalsIgnoreCase("small")) {
|
||||
type = SmallFireball.class;
|
||||
} else if (args[0].equalsIgnoreCase("arrow")) {
|
||||
type = Arrow.class;
|
||||
} else if (args[0].equalsIgnoreCase("skull")) {
|
||||
type = WitherSkull.class;
|
||||
} else if (args[0].equalsIgnoreCase("egg")) {
|
||||
type = Egg.class;
|
||||
} else if (args[0].equalsIgnoreCase("snowball")) {
|
||||
type = Snowball.class;
|
||||
} else if (args[0].equalsIgnoreCase("expbottle")) {
|
||||
type = ThrownExpBottle.class;
|
||||
} else if (args[0].equalsIgnoreCase("large")) {
|
||||
type = LargeFireball.class;
|
||||
}
|
||||
}
|
||||
final Vector direction = user.getBase().getEyeLocation().getDirection().multiply(speed);
|
||||
projectile = (Projectile) user.getWorld().spawn(user.getBase().getEyeLocation().add(direction.getX(), direction.getY(), direction.getZ()), type);
|
||||
projectile.setShooter(user.getBase());
|
||||
projectile.setVelocity(direction);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue