Advertisement
Guest User

Code

a guest
Jun 26th, 2018
271
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.59 KB | None | 0 0
  1. package me.jamesd5.MasterHealth;
  2.  
  3. import java.util.logging.Logger;
  4.  
  5. import org.bukkit.ChatColor;
  6. import org.bukkit.command.Command;
  7. import org.bukkit.command.CommandSender;
  8. import org.bukkit.entity.Player;
  9. import org.bukkit.plugin.PluginDescriptionFile;
  10. import org.bukkit.plugin.java.JavaPlugin;
  11.  
  12. public class MasterHealth extends JavaPlugin{
  13. public final Logger logger = Logger.getLogger("Minecraft");
  14. public static MasterHealth plugin;
  15.  
  16. @Override
  17. public void onDisable() {
  18. PluginDescriptionFile pdfFile = this.getDescription();
  19. this.logger.info(pdfFile.getName() + "FrozenLemon is disabled! :-: Is it up to date?");
  20.  
  21. }
  22.  
  23. @Override
  24. public void onEnable() {
  25. PluginDescriptionFile pdfFile = this.getDescription();
  26. this.logger.info(pdfFile.getName() + " Version " + pdfFile.getVersion() + "--FrozenLemon is enabled! Sour. :>");
  27.  
  28. }
  29.  
  30. public boolean onCommand1(CommandSender sender, Command cmd, String commandLabel, String[] args) {
  31. if (cmd.getName().equalsIgnoreCase("frozenlemon")) {
  32. if (sender instanceof Player) {
  33. Player player = (Player)sender;
  34. if (player.hasPermission("frozenlemon.help")) {
  35. player.sendMessage(ChatColor.YELLOW + "~-~-~-~-~-~-~-~-~-~");//Your message
  36. player.sendMessage(ChatColor.GREEN + "/fl help -> Lists commands");
  37. player.sendMessage(ChatColor.GREEN + "/fl info -> Gives info on the Plugin");
  38. player.sendMessage(ChatColor.GREEN + "/fl food (#1-20) -> Sets food amount");
  39. player.sendMessage(ChatColor.GREEN + "/fl food reset -> Resets the food amount");
  40. player.sendMessage(ChatColor.GREEN + "/fl (#1-40) -> Sets health amount");
  41. player.sendMessage(ChatColor.GREEN + "/fl health reset -> Resets the health amount");
  42. player.sendMessage(ChatColor.YELLOW + "~-~-~-~-~-~-~-~-~-~");
  43. }
  44. else {
  45. player.sendMessage(ChatColor.RED + "You do not have permission!");
  46. return false;
  47. }
  48. }
  49. }
  50. return true;
  51. }
  52.  
  53.  
  54. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement