Advertisement
Guest User

Simple Hello Plugin

a guest
Oct 10th, 2015
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. package me.JasGames.Hello;
  2.  
  3. import org.bukkit.command.Command;
  4. import org.bukkit.command.CommandSender;
  5. import org.bukkit.entity.Player;
  6. import org.bukkit.plugin.java.JavaPlugin;
  7.  
  8. public class Main extends JavaPlugin {
  9.  
  10. public void onEnable()
  11. {
  12. getLogger().info("This plugin has been enabled");
  13. }
  14.  
  15. public void onDisable() {}
  16.  
  17. public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args)
  18. {
  19. if (cmd.getName().equalsIgnoreCase("hello")) {
  20. {
  21. Player p = (Player)sender;
  22. p.sendMessage("§3Hello§b " + p.getName() + "§b!");
  23. return true;
  24. }
  25. }
  26. return false;
  27. }
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement