View difference between Paste ID: pWaqwE4s and dugeikyJ
SHOW: | | - or go back to the newest paste.
1
package me.nique.plugins.cvsboom;
2
3
import org.bukkit.command.Command;
4
import org.bukkit.command.CommandSender;
5
import org.bukkit.entity.Player;
6
import org.bukkit.plugin.java.JavaPlugin;
7
8
public class Cvsboom extends JavaPlugin{
9
    public void onEnable(){
10
		getLogger().info("Boom Enabled");
11
	}
12
 
13
	public void onDisable(){
14
		getLogger().info("Boom Disabled");
15
	}
16
17
        public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args){
18
	    if(cmd.getName().equalsIgnoreCase("boom")){
19-
	    	float explosionPower = 9F; //This is the explosion power - TNT explosions are 4F by default
19+
	    	float explosionPower = 9F;
20
	        Player target = sender.getServer().getPlayer(args[0]);
21
	        target.getWorld().createExplosion(target.getLocation(), explosionPower);
22
	        target.setHealth(0); 
23
	    }
24
	    return false;
25
	}
26
}