BeshoGraphix

Untitled

May 12th, 2014
166
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.02 KB | None | 0 0
  1. package me.besho.bc;
  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 BroadCast extends JavaPlugin {
  11.  
  12. public void onEnabled (){
  13. System.out.println("Enabled");
  14. }
  15. public void onDisabled (){
  16. System.out.println("Disabled");
  17. }
  18. public boolean onCommand(CommandSender sender, Command cmd, String Label, String args[]){
  19.  
  20. if(sender instanceof Player){
  21.  
  22. if (cmd.getName().equalsIgnoreCase("tc")){
  23.  
  24. if(args.length == 0){
  25.  
  26. sender.sendMessage(ChatColor.RED + " /tc <message>");
  27.  
  28. }
  29.  
  30. if(args.length == 1){
  31.  
  32.  
  33. Bukkit.broadcastMessage(ChatColor.translateAlternateColorCodes('&',args[0] + " "));
  34.  
  35. }
  36. }
  37. }
  38. return true;
  39. }
  40. }
Advertisement
Add Comment
Please, Sign In to add comment