Advertisement
josh03222

My (Probably Crappy) Plugin

Aug 28th, 2015
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.80 KB | None | 0 0
  1. package me.josh03222.TestPlugin;
  2.  
  3. import org.bukkit.ChatColor;
  4. import org.bukkit.command.Command;
  5. import org.bukkit.command.CommandSender;
  6. import org.bukkit.entity.Player;
  7. import org.bukkit.plugin.java.JavaPlugin;
  8.  
  9. public class main extends JavaPlugin{
  10.  
  11. public void onEnable(){
  12. getLogger().info("Disabled!");
  13. }
  14.  
  15. public void onDisable(){
  16. getLogger().info("Enabled!");
  17. }
  18. public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args){
  19. Player player = (Player) sender;
  20. if(cmd.getName().equalsIgnoreCase("hello")){
  21. player.sendMessage(ChatColor.AQUA + "<josh03222> Hi!");
  22. }
  23. return false;
  24. }
  25. }
  26.  
  27.  
  28. ==================
  29. plugin.yml:
  30. ==================
  31.  
  32. name: Hello
  33. main: me.Hello.Hello
  34. version: 0.1
  35. commands:
  36. hello:
  37. description: Hi!!
  38. usage: /hello
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement