Advertisement
Guest User

Oohkillem.java

a guest
Jul 23rd, 2014
226
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.06 KB | None | 0 0
  1. package me.Zayn.Oohkillem;
  2.  
  3. import org.bukkit.Bukkit;
  4. import org.bukkit.ChatColor;
  5. import org.bukkit.command.Command;
  6. import org.bukkit.command.CommandSender;
  7. import org.bukkit.entity.Player;
  8. import org.bukkit.plugin.java.JavaPlugin;
  9.  
  10. public class Oohkillem extends JavaPlugin {
  11.  
  12. public void onEnable() {
  13. Bukkit.getServer().getLogger().info(ChatColor.GREEN + "Oohkillem plugin enabled");
  14. }
  15.  
  16. public void onDisable() {
  17. Bukkit.getServer().getLogger().info(ChatColor.RED + "Oohkillem plugin disabled");
  18. }
  19.  
  20. public boolean onCommand (CommandSender sender, Command cmd, String commandLabel, String[] args) {
  21.  
  22. if (!(sender instanceof Player)) {
  23. sender.sendMessage(ChatColor.RED + "The console cannot use the oohkillem plugin!");
  24. }
  25.  
  26. Player player = (Player) sender;
  27.  
  28. if(cmd.getName().equalsIgnoreCase("oohkillem")) {
  29. sender.sendMessage("We're sorry to see you go...");
  30. Bukkit.getServer().dispatchCommand(Bukkit.getServer().getConsoleSender(), "summon LightningBolt " + player.getLocation());
  31. }
  32. return false;
  33. }
  34. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement