Advertisement
Guest User

Java

a guest
Sep 8th, 2015
37
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.39 KB | None | 0 0
  1. package me.TimewalkerZ.Spongebob;
  2.  
  3. import java.util.logging.Logger;
  4.  
  5.  
  6. import org.bukkit.ChatColor;
  7. import org.bukkit.Material;
  8. import org.bukkit.command.Command;
  9. import org.bukkit.command.CommandSender;
  10. import org.bukkit.entity.Player;
  11. import org.bukkit.inventory.ItemStack;
  12. import org.bukkit.plugin.PluginDescriptionFile;
  13. import org.bukkit.plugin.java.JavaPlugin;
  14.  
  15. public class Spongebob extends JavaPlugin{
  16. public final Logger logger = Logger.getLogger("Minecraft");
  17. public static Spongebob plugin;
  18.  
  19. @Override
  20. public void onDisable() {
  21. PluginDescriptionFile pdfFile = this.getDescription();
  22. this.logger.info(pdfFile.getName() + " Has been Disabled!");
  23.  
  24. }
  25.  
  26. @Override
  27. public void onEnable() {
  28. PluginDescriptionFile pdfFile = this.getDescription();
  29. this.logger.info(pdfFile.getName() + " Version " + pdfFile.getVersion() + " Has been Enabled!");
  30.  
  31. }
  32.  
  33. public boolean onCommand(CommandSender sender, Command cmd, String commandLabel, String[] args){
  34. int prog = 0;
  35. Player player = (Player) sender;
  36. if(commandLabel.equalsIgnoreCase("startsong")) {
  37. if(prog == 0) {
  38. player.sendMessage(ChatColor.GREEN + "Are you ready, kids?");
  39. prog = prog + 1;
  40. }
  41. else {
  42. player.sendMessage(ChatColor.RED + "You have started the song already! Do /stopsong to reset the song.");
  43. }
  44. return false;
  45. }
  46. else if(commandLabel.equalsIgnoreCase("ayeayecaptain")) {
  47. if(prog == 0) {
  48. player.sendMessage(ChatColor.RED + "Do /startsong to begin your song!");
  49. }
  50. else if(prog == 1) {
  51. player.sendMessage(ChatColor.AQUA + "Aye, aye, captain!");
  52. player.sendMessage(ChatColor.GREEN + "I can't hear you!");
  53. prog = prog + 1;
  54. }
  55. else if(prog == 2) {
  56. player.sendMessage(ChatColor.AQUA + "Aye, aye, captain!");
  57. player.sendMessage(ChatColor.GREEN + "Ooooooooooh");
  58. prog = prog + 1;
  59. player.sendMessage(ChatColor.YELLOW + "Who lives in a pineapple under the sea?");
  60. }
  61. else {
  62. player.sendMessage(ChatColor.RED + "You are past this part! Do /stopsong to restart the song.");
  63. }
  64. return false;
  65. }
  66. else if(commandLabel.equalsIgnoreCase("spongebobsquarepants")) {
  67. if(prog<3 && prog>0) {
  68. player.sendMessage(ChatColor.RED + "You haven't reach this part yet! Do /stopsong to restart the song.");
  69. }
  70. else if(prog == 0) {
  71. player.sendMessage(ChatColor.RED + "Do /startsong to begin your song!");
  72. }
  73. else if(prog == 3) {
  74. player.sendMessage(ChatColor.GOLD + "SpongeBob SquarePants!");
  75. player.sendMessage(ChatColor.YELLOW + "Absorbent and yellow and porous is he!");
  76. prog = prog + 1;
  77. }
  78. else if(prog == 4) {
  79. player.sendMessage(ChatColor.GOLD + "SpongeBob SquarePants!");
  80. player.sendMessage(ChatColor.YELLOW + "If nautical nonsense be something you wish.");
  81. prog = prog + 1;
  82. }
  83. else if(prog == 5) {
  84. player.sendMessage(ChatColor.GOLD + "SpongeBob SquarePants!");
  85. player.sendMessage(ChatColor.YELLOW + "Then drop on the deck and you flop like a fish");
  86. prog = prog + 1;
  87. }
  88. else if(prog == 6) {
  89. player.sendMessage(ChatColor.GOLD + "SpongeBob SquarePants!");
  90. player.sendMessage(ChatColor.YELLOW + "Ready?");
  91. player.sendMessage(ChatColor.YELLOW + "SpongeBob SquarePants,");
  92. player.sendMessage(ChatColor.YELLOW + "SpongeBob SquarePants,");
  93. player.sendMessage(ChatColor.YELLOW + "SpongeBob SquarePants!");
  94. player.sendMessage(ChatColor.YELLOW + "HA HA HA HA HA HA HA HA");
  95. prog = prog - prog;
  96. }
  97. return false;
  98. }
  99. else if(commandLabel.equalsIgnoreCase("stopsong")) {
  100. prog = prog - prog;
  101. player.sendMessage(ChatColor.RED + "Song Resetted! Do /startsong to start.");
  102. return false;
  103. }
  104. else if(commandLabel.equalsIgnoreCase("spongehelp")) {
  105. player.sendMessage(ChatColor.GOLD + "Spongebob v1.0 by TimewalkerZ");
  106. player.sendMessage(ChatColor.GOLD + "/ayeayecaptain - Response");
  107. player.sendMessage(ChatColor.GOLD + "/spongebobsquarepants - Response");
  108. player.sendMessage(ChatColor.GOLD + "/spongehelp - Display this page");
  109. player.sendMessage(ChatColor.GOLD + "/startsong - Begin the song");
  110. player.sendMessage(ChatColor.GOLD + "/stopsong - Stop the song");
  111. return false;
  112. }
  113. else {
  114. return false;
  115. }
  116. }
  117. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement