Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package me.Zayn.Oohkillem;
- import org.bukkit.Bukkit;
- import org.bukkit.ChatColor;
- import org.bukkit.command.Command;
- import org.bukkit.command.CommandSender;
- import org.bukkit.entity.Player;
- import org.bukkit.plugin.java.JavaPlugin;
- public class Oohkillem extends JavaPlugin {
- public void onEnable() {
- Bukkit.getServer().getLogger().info(ChatColor.GREEN + "Oohkillem plugin enabled");
- }
- public void onDisable() {
- Bukkit.getServer().getLogger().info(ChatColor.RED + "Oohkillem plugin disabled");
- }
- public boolean onCommand (CommandSender sender, Command cmd, String commandLabel, String[] args) {
- if (!(sender instanceof Player)) {
- sender.sendMessage(ChatColor.RED + "The console cannot use the oohkillem plugin!");
- }
- Player player = (Player) sender;
- if(cmd.getName().equalsIgnoreCase("oohkillem")) {
- sender.sendMessage("We're sorry to see you go...");
- Bukkit.getServer().dispatchCommand(Bukkit.getServer().getConsoleSender(), "summon LightningBolt " + player.getLocation());
- }
- return false;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement