Advertisement
Guest User

Colours

a guest
Sep 3rd, 2013
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.30 KB | None | 0 0
  1. package coloursmraserfiles.jaffas4life;
  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. {
  13. getLogger().info("Colours Enabled!");
  14. }
  15.  
  16. public void onDisable()
  17. {
  18. getLogger().info("Colours Disabled");
  19. }
  20. public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args)
  21. {
  22. if(sender instanceof Player){
  23. Player player = (Player) sender;
  24. if(cmd.getName().equalsIgnoreCase("Colour"))
  25. { // If the player typed /Colours then this bit
  26. player.sendMessage(ChatColor.BLACK + "0" + ChatColor.DARK_BLUE + "1" + ChatColor.DARK_GREEN + "2" + ChatColor.DARK_AQUA + "3" + ChatColor.DARK_RED + "4" + ChatColor.DARK_PURPLE + "5" + ChatColor.GOLD + "6" + ChatColor.GRAY + "7" + ChatColor.DARK_GRAY + "8" + ChatColor.LIGHT_PURPLE + "9" + ChatColor.GREEN + "a" + ChatColor.AQUA + "b" + ChatColor.RED + "c" + ChatColor.LIGHT_PURPLE + "d" + ChatColor.GREEN + "e" + ChatColor.WHITE + "f");
  27. return true;
  28. } //If this has happened the function will return true.
  29. // If this hasn't happened the a value of false will be returned.
  30. return false;
  31. }
  32. return false;
  33. }
  34. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement