Advertisement
thegarfish

Untitled

Sep 8th, 2013
39
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.26 KB | None | 0 0
  1. package me.thegarfish.siege;
  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 Main extends JavaPlugin {
  13. public final Logger logger = Logger.getLogger("Minecraft");
  14. public static Main plugin;
  15.  
  16. @Override
  17. public void onEnable(){
  18. PluginDescriptionFile pdfFile = this.getDescription();
  19. this.logger.info(pdfFile.getName() + pdfFile.getVersion() + " has been enabled" );
  20.  
  21. }
  22.  
  23. @Override
  24. public void onDisable(){
  25. PluginDescriptionFile pdfFile = this.getDescription();
  26. this.logger.info(pdfFile.getName() + pdfFile.getVersion() + " has been enabled" );
  27. }
  28.  
  29.  
  30. public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args){
  31. Player player = (Player) sender;
  32.  
  33. if(label.equalsIgnoreCase("newteam") && player.isOp()){
  34. if(args.length == 0){
  35. Team.newTeam(args [0], player);
  36. }else{
  37. player.sendMessage(ChatColor.RED + "Usage: /newteam <team name>");
  38. }
  39. }
  40. if(label.equalsIgnoreCase("setlobby") && player.isOp()){
  41. if(args.length==0){
  42. Team.teamSetSpawn(player.getLocation(), args [0],player);
  43. }else{
  44. player.sendMessage(ChatColor.RED + "Usage: /setlobby <team name>");
  45. }
  46. }
  47. if(label.equalsIgnoreCase("jointeam") && player.isOp()){
  48. if(args.length==0){
  49. Team.joinTeam(player, args [0]);
  50. }else{
  51. player.sendMessage(ChatColor.RED + "Usage: /jointeam <team name>");
  52. }
  53. }
  54. if(label.equalsIgnoreCase("teamsetspawn")){
  55. if(args.length==0){
  56. Team.teamSetSpawn(player.getLocation(),args [0], player);
  57. }else{
  58. player.sendMessage(ChatColor.RED + "Usage: /teamsetspawn <team name>");
  59. }
  60. }
  61. return false;
  62. }
  63. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement