mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2025-07-24 06:23:59 +00:00
/antioch now uses bukkit code
This commit is contained in:
parent
0a924bf226
commit
b9e56d100c
1 changed files with 3 additions and 8 deletions
|
@ -1,12 +1,10 @@
|
||||||
package com.earth2me.essentials.commands;
|
package com.earth2me.essentials.commands;
|
||||||
|
|
||||||
import net.minecraft.server.EntityTNTPrimed;
|
|
||||||
import net.minecraft.server.World;
|
|
||||||
import org.bukkit.Location;
|
import org.bukkit.Location;
|
||||||
import org.bukkit.Server;
|
import org.bukkit.Server;
|
||||||
import org.bukkit.craftbukkit.CraftWorld;
|
|
||||||
import com.earth2me.essentials.User;
|
import com.earth2me.essentials.User;
|
||||||
import com.earth2me.essentials.TargetBlock;
|
import com.earth2me.essentials.TargetBlock;
|
||||||
|
import org.bukkit.entity.TNTPrimed;
|
||||||
|
|
||||||
|
|
||||||
public class Commandantioch extends EssentialsCommand
|
public class Commandantioch extends EssentialsCommand
|
||||||
|
@ -17,16 +15,13 @@ public class Commandantioch extends EssentialsCommand
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void run(Server server, User user, String commandLabel, String[] args) throws Exception
|
public void run(final Server server, final User user, final String commandLabel, final String[] args) throws Exception
|
||||||
{
|
{
|
||||||
charge(user);
|
charge(user);
|
||||||
ess.broadcastMessage(user.getName(), "...lobbest thou thy Holy Hand Grenade of Antioch towards thy foe,");
|
ess.broadcastMessage(user.getName(), "...lobbest thou thy Holy Hand Grenade of Antioch towards thy foe,");
|
||||||
ess.broadcastMessage(user.getName(), "who being naughty in My sight, shall snuff it.");
|
ess.broadcastMessage(user.getName(), "who being naughty in My sight, shall snuff it.");
|
||||||
|
|
||||||
final World world = ((CraftWorld)user.getWorld()).getHandle();
|
|
||||||
final Location loc = new TargetBlock(user).getTargetBlock().getLocation();
|
final Location loc = new TargetBlock(user).getTargetBlock().getLocation();
|
||||||
final EntityTNTPrimed tnt = new EntityTNTPrimed(world, loc.getBlockX(), loc.getBlockY(), loc.getBlockZ());
|
loc.getWorld().spawn(loc, TNTPrimed.class);
|
||||||
world.addEntity(tnt);
|
|
||||||
world.makeSound(tnt, "random.fuse", 1.0F, 1.0F);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue