mirror of
https://github.com/essentials/Essentials.git
synced 2025-08-13 10:04:51 +02:00
Remove kittycannon
This commit is contained in:
@@ -1,48 +0,0 @@
|
|||||||
package com.earth2me.essentials.commands;
|
|
||||||
|
|
||||||
import com.earth2me.essentials.Mob;
|
|
||||||
import com.earth2me.essentials.User;
|
|
||||||
import java.util.Random;
|
|
||||||
import org.bukkit.Location;
|
|
||||||
import org.bukkit.Server;
|
|
||||||
import org.bukkit.entity.Ocelot;
|
|
||||||
|
|
||||||
// This command is not documented on the wiki #EasterEgg
|
|
||||||
public class Commandkittycannon extends EssentialsCommand
|
|
||||||
{
|
|
||||||
private static final Random random = new Random();
|
|
||||||
|
|
||||||
public Commandkittycannon()
|
|
||||||
{
|
|
||||||
super("kittycannon");
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void run(final Server server, final User user, final String commandLabel, final String[] args) throws Exception
|
|
||||||
{
|
|
||||||
final Mob cat = Mob.OCELOT;
|
|
||||||
final Ocelot ocelot = (Ocelot)cat.spawn(user.getWorld(), server, user.getBase().getEyeLocation());
|
|
||||||
if (ocelot == null)
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
final int i = random.nextInt(Ocelot.Type.values().length);
|
|
||||||
ocelot.setCatType(Ocelot.Type.values()[i]);
|
|
||||||
ocelot.setTamed(true);
|
|
||||||
ocelot.setBaby();
|
|
||||||
ocelot.setVelocity(user.getBase().getEyeLocation().getDirection().multiply(2));
|
|
||||||
|
|
||||||
class KittyCannonExplodeTask implements Runnable
|
|
||||||
{
|
|
||||||
@Override
|
|
||||||
public void run()
|
|
||||||
{
|
|
||||||
final Location loc = ocelot.getLocation();
|
|
||||||
ocelot.remove();
|
|
||||||
loc.getWorld().createExplosion(loc, 0F);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
ess.scheduleSyncDelayedTask(new KittyCannonExplodeTask(), 20);
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
@@ -206,10 +206,6 @@ commands:
|
|||||||
description: Obtains the specified kit or views all available kits.
|
description: Obtains the specified kit or views all available kits.
|
||||||
usage: /<command> [kit] [player]
|
usage: /<command> [kit] [player]
|
||||||
aliases: [ekit,kits,ekits]
|
aliases: [ekit,kits,ekits]
|
||||||
kittycannon:
|
|
||||||
description: Throw an exploding kitten at your opponent.
|
|
||||||
usage: /<command>
|
|
||||||
aliases: [ekittycannon]
|
|
||||||
lightning:
|
lightning:
|
||||||
description: The power of Thor. Strike at cursor or player.
|
description: The power of Thor. Strike at cursor or player.
|
||||||
usage: /<command> [player] [power]
|
usage: /<command> [player] [power]
|
||||||
|
Reference in New Issue
Block a user