Advertisement
Guest User

Untitled

a guest
Dec 15th, 2013
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.92 KB | None | 0 0
  1. package me.Zayn.zFirst;
  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 First extends JavaPlugin {
  11.  
  12. public void onEnable() {
  13. Bukkit.getServer().getLogger().info(ChatColor.RED + "FirstPlugin enabled!");
  14. }
  15.  
  16. public void onDisable() {
  17. Bukkit.getServer().getLogger().info(ChatColor.RED + "FirstPlugin 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 command!"));
  24. return true;
  25. }
  26. Player player = (Player) sender;
  27.  
  28. if(player.isBlocking());
  29. player.setHealth(2.0);
  30. player.sendMessage("You have been healed!");
  31. return true;
  32. }
  33. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement