Advertisement
Guest User

Untitled

a guest
Apr 30th, 2013
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.29 KB | None | 0 0
  1. package me.zach.to;
  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 commands extends JavaPlugin{
  13. public final Logger logger = Logger.getLogger("Minecraft");
  14. public static commands plugin;
  15. @Override
  16. public void onDisable() {
  17. PluginDescriptionFile pdfFile = this.getDescription();
  18. this.logger.info(pdfFile.getName() + "Disabled");
  19. }
  20. @Override
  21. public void onEnable() {
  22. PluginDescriptionFile pdfFile = this.getDescription();
  23. this.logger.info(pdfFile.getName() + " " + pdfFile.getVersion() + " Enabled");
  24. }
  25. public boolean onCommand(CommandSender sender, Command cmd, String commandLabel, String[] arges){
  26. Player player = (Player) sender;
  27. if(commandLabel.equalsIgnoreCase("telep")){
  28. if(arges.length==0){
  29. player.sendMessage(ChatColor.AQUA + "Teleporter V.Beta 1.0");
  30. player.sendMessage(ChatColor.AQUA + "Plugin made by: Zach Farley");
  31. }if(arges.length==1){
  32. player.sendMessage("It works!");
  33. }if(arges.length>1){
  34. player.sendMessage(ChatColor.DARK_RED + "Too many arges!");
  35. }
  36.  
  37. }
  38. return false;
  39.  
  40. }
  41.  
  42. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement