Advertisement
Grieftime

Untitled

Sep 9th, 2018
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.07 KB | None | 0 0
  1. package command;
  2.  
  3. import java.util.ArrayList;
  4.  
  5. import org.bukkit.Bukkit;
  6. import org.bukkit.Sound;
  7. import org.bukkit.command.Command;
  8. import org.bukkit.command.CommandExecutor;
  9. import org.bukkit.command.CommandSender;
  10. import org.bukkit.entity.Player;
  11.  
  12. import main.Main;
  13.  
  14. public class OhrFickCommand implements CommandExecutor{
  15.  
  16. public ArrayList<Player> zerstört = new ArrayList<Player>();
  17.  
  18. @Override
  19. public boolean onCommand(CommandSender cs, Command command, String label, String[] args) {
  20.  
  21.  
  22. if(!(cs instanceof Player)) {
  23. cs.sendMessage("Du musst ein Spieler sein!");
  24. return true;
  25. }
  26.  
  27. Player p = (Player) cs;
  28.  
  29. if(!p.hasPermission("ghostcraft.ohrfick")){
  30. p.sendMessage("§4Dazu hast du keine Rechte!");
  31. return true;
  32. }
  33.  
  34.  
  35.  
  36. Player target = Bukkit.getPlayer(args[0]);
  37. if(target instanceof Player){
  38. target.playSound(target.getLocation(), Sound.BAT_DEATH, 1, 1);
  39. target.playSound(target.getLocation(), Sound.BAT_HURT, 3000, 2000);
  40. target.playSound(target.getLocation(), Sound.BAT_IDLE, 1, 1);
  41. target.playSound(target.getLocation(), Sound.BAT_LOOP, 1, 1);
  42. target.playSound(target.getLocation(), Sound.PIG_DEATH, 1, 1);
  43. target.playSound(target.getLocation(), Sound.ENDERMAN_SCREAM, 1, 1);
  44. target.playSound(target.getLocation(), Sound.ENDERDRAGON_DEATH, 1, 1);
  45. target.playSound(target.getLocation(), Sound.WITHER_DEATH, 1, 1);
  46. target.playSound(target.getLocation(), Sound.HORSE_DEATH, 1, 1);
  47. target.playSound(target.getLocation(), Sound.IRONGOLEM_DEATH, 1, 1);
  48. target.playSound(target.getLocation(), Sound.BAT_DEATH, 1, 1);
  49. target.playSound(target.getLocation(), Sound.BAT_HURT, 1, 1);
  50. target.playSound(target.getLocation(), Sound.BAT_IDLE, 1, 1);
  51. target.playSound(target.getLocation(), Sound.BAT_LOOP, 1, 1);
  52. target.playSound(target.getLocation(), Sound.PIG_DEATH, 1, 1);
  53. target.playSound(target.getLocation(), Sound.ENDERMAN_SCREAM, 1, 1);
  54. target.playSound(target.getLocation(), Sound.ENDERDRAGON_DEATH, 1, 1);
  55. target.playSound(target.getLocation(), Sound.WITHER_DEATH, 1, 1);
  56. target.playSound(target.getLocation(), Sound.HORSE_DEATH, 1, 1);
  57. target.playSound(target.getLocation(), Sound.IRONGOLEM_DEATH, 1, 1);
  58. target.playSound(target.getLocation(), Sound.BAT_DEATH, 1, 1);
  59. target.playSound(target.getLocation(), Sound.BAT_HURT, 1, 1);
  60. target.playSound(target.getLocation(), Sound.BAT_IDLE, 1, 1);
  61. target.playSound(target.getLocation(), Sound.BAT_LOOP, 1, 1);
  62. target.playSound(target.getLocation(), Sound.PIG_DEATH, 1, 1);
  63. target.playSound(target.getLocation(), Sound.ENDERMAN_SCREAM, 1, 1);
  64. target.playSound(target.getLocation(), Sound.ENDERDRAGON_DEATH, 1, 1);
  65. target.playSound(target.getLocation(), Sound.WITHER_DEATH, 1, 1);
  66. target.playSound(target.getLocation(), Sound.HORSE_DEATH, 1, 1);
  67. target.playSound(target.getLocation(), Sound.IRONGOLEM_DEATH, 1, 1);
  68. target.playSound(target.getLocation(), Sound.BAT_DEATH, 1, 1);
  69. target.playSound(target.getLocation(), Sound.BAT_HURT, 1, 1);
  70. target.playSound(target.getLocation(), Sound.BAT_IDLE, 1, 1);
  71. target.playSound(target.getLocation(), Sound.BAT_LOOP, 1, 1);
  72. target.playSound(target.getLocation(), Sound.PIG_DEATH, 1, 1);
  73. target.playSound(target.getLocation(), Sound.ENDERMAN_SCREAM, 1, 1);
  74. target.playSound(target.getLocation(), Sound.ENDERDRAGON_DEATH, 1, 1);
  75. target.playSound(target.getLocation(), Sound.WITHER_DEATH, 1, 1);
  76. target.playSound(target.getLocation(), Sound.HORSE_DEATH, 1, 1);
  77. target.playSound(target.getLocation(), Sound.IRONGOLEM_DEATH, 1, 1);
  78. target.playSound(target.getLocation(), Sound.BAT_DEATH, 1, 1);
  79. target.playSound(target.getLocation(), Sound.BAT_HURT, 1, 1);
  80. target.playSound(target.getLocation(), Sound.BAT_IDLE, 1, 1);
  81. target.playSound(target.getLocation(), Sound.BAT_LOOP, 1, 1);
  82. target.playSound(target.getLocation(), Sound.PIG_DEATH, 1, 1);
  83. target.playSound(target.getLocation(), Sound.ENDERMAN_SCREAM, 1, 1);
  84. target.playSound(target.getLocation(), Sound.ENDERDRAGON_DEATH, 1, 1);
  85. target.playSound(target.getLocation(), Sound.WITHER_DEATH, 1, 1);
  86. target.playSound(target.getLocation(), Sound.HORSE_DEATH, 1, 1);
  87. target.playSound(target.getLocation(), Sound.IRONGOLEM_DEATH, 1, 1);
  88. target.playSound(target.getLocation(), Sound.BAT_DEATH, 1, 1);
  89. target.playSound(target.getLocation(), Sound.BAT_HURT, 1, 1);
  90. target.playSound(target.getLocation(), Sound.BAT_IDLE, 1, 1);
  91. target.playSound(target.getLocation(), Sound.BAT_LOOP, 1, 1);
  92. target.playSound(target.getLocation(), Sound.PIG_DEATH, 1, 1);
  93. target.playSound(target.getLocation(), Sound.ENDERMAN_SCREAM, 1, 1);
  94. target.playSound(target.getLocation(), Sound.ENDERDRAGON_DEATH, 1, 1);
  95. target.playSound(target.getLocation(), Sound.WITHER_DEATH, 1, 1);
  96. target.playSound(target.getLocation(), Sound.HORSE_DEATH, 1, 1);
  97. target.playSound(target.getLocation(), Sound.IRONGOLEM_DEATH, 1, 1);
  98. target.playSound(target.getLocation(), Sound.BAT_DEATH, 1, 1);
  99. target.playSound(target.getLocation(), Sound.BAT_HURT, 1, 1);
  100. target.playSound(target.getLocation(), Sound.BAT_IDLE, 1, 1);
  101. target.playSound(target.getLocation(), Sound.BAT_LOOP, 1, 1);
  102. target.playSound(target.getLocation(), Sound.PIG_DEATH, 1, 1);
  103. target.playSound(target.getLocation(), Sound.ENDERMAN_SCREAM, 1, 1);
  104. target.playSound(target.getLocation(), Sound.ENDERDRAGON_DEATH, 1, 1);
  105. target.playSound(target.getLocation(), Sound.WITHER_DEATH, 1, 1);
  106. target.playSound(target.getLocation(), Sound.HORSE_DEATH, 1, 1);
  107. target.playSound(target.getLocation(), Sound.IRONGOLEM_DEATH, 1, 1);
  108. target.playSound(target.getLocation(), Sound.BAT_DEATH, 1, 1);
  109. target.playSound(target.getLocation(), Sound.BAT_HURT, 1, 1);
  110. target.playSound(target.getLocation(), Sound.BAT_IDLE, 1, 1);
  111. target.playSound(target.getLocation(), Sound.BAT_LOOP, 1, 1);
  112. target.playSound(target.getLocation(), Sound.PIG_DEATH, 1, 1);
  113. target.playSound(target.getLocation(), Sound.ENDERMAN_SCREAM, 1, 1);
  114. target.playSound(target.getLocation(), Sound.ENDERDRAGON_DEATH, 1, 1);
  115. target.playSound(target.getLocation(), Sound.WITHER_DEATH, 1, 1);
  116. target.playSound(target.getLocation(), Sound.HORSE_DEATH, 1, 1);
  117. target.playSound(target.getLocation(), Sound.IRONGOLEM_DEATH, 1, 1);
  118. target.playSound(target.getLocation(), Sound.BAT_DEATH, 1, 1);
  119. target.playSound(target.getLocation(), Sound.BAT_HURT, 1, 1);
  120. target.playSound(target.getLocation(), Sound.BAT_IDLE, 1, 1);
  121. target.playSound(target.getLocation(), Sound.BAT_LOOP, 1, 1);
  122. target.playSound(target.getLocation(), Sound.PIG_DEATH, 1, 1);
  123. target.playSound(target.getLocation(), Sound.ENDERMAN_SCREAM, 1, 1);
  124. target.playSound(target.getLocation(), Sound.ENDERDRAGON_DEATH, 1, 1);
  125. target.playSound(target.getLocation(), Sound.WITHER_DEATH, 1, 1);
  126. target.playSound(target.getLocation(), Sound.HORSE_DEATH, 1, 1);
  127. target.playSound(target.getLocation(), Sound.IRONGOLEM_DEATH, 1, 1);
  128. target.playSound(target.getLocation(), Sound.BAT_DEATH, 1, 1);
  129. target.playSound(target.getLocation(), Sound.BAT_HURT, 1, 1);
  130. target.playSound(target.getLocation(), Sound.BAT_IDLE, 1, 1);
  131. target.playSound(target.getLocation(), Sound.BAT_LOOP, 1, 1);
  132. target.playSound(target.getLocation(), Sound.PIG_DEATH, 1, 1);
  133. target.playSound(target.getLocation(), Sound.ENDERMAN_SCREAM, 1, 1);
  134. target.playSound(target.getLocation(), Sound.ENDERDRAGON_DEATH, 1, 1);
  135. target.playSound(target.getLocation(), Sound.WITHER_DEATH, 1, 1);
  136. target.playSound(target.getLocation(), Sound.HORSE_DEATH, 1, 1);
  137. target.playSound(target.getLocation(), Sound.IRONGOLEM_DEATH, 1, 1);
  138. target.playSound(target.getLocation(), Sound.BAT_DEATH, 1, 1);
  139. target.playSound(target.getLocation(), Sound.BAT_HURT, 1, 1);
  140. target.playSound(target.getLocation(), Sound.BAT_IDLE, 1, 1);
  141. target.playSound(target.getLocation(), Sound.BAT_LOOP, 1, 1);
  142. target.playSound(target.getLocation(), Sound.PIG_DEATH, 1, 1);
  143. target.playSound(target.getLocation(), Sound.ENDERMAN_SCREAM, 1, 1);
  144. target.playSound(target.getLocation(), Sound.ENDERDRAGON_DEATH, 1, 1);
  145. target.playSound(target.getLocation(), Sound.WITHER_DEATH, 1, 1);
  146. target.playSound(target.getLocation(), Sound.HORSE_DEATH, 1, 1);
  147. target.playSound(target.getLocation(), Sound.IRONGOLEM_DEATH, 1, 1);
  148. target.playSound(target.getLocation(), Sound.BAT_DEATH, 1, 1);
  149. target.playSound(target.getLocation(), Sound.BAT_HURT, 1, 1);
  150. target.playSound(target.getLocation(), Sound.BAT_IDLE, 1, 1);
  151. target.playSound(target.getLocation(), Sound.BAT_LOOP, 1, 1);
  152. target.playSound(target.getLocation(), Sound.PIG_DEATH, 1, 1);
  153. target.playSound(target.getLocation(), Sound.ENDERMAN_SCREAM, 1, 1);
  154. target.playSound(target.getLocation(), Sound.ENDERDRAGON_DEATH, 1, 1);
  155. target.playSound(target.getLocation(), Sound.WITHER_DEATH, 1, 1);
  156. target.playSound(target.getLocation(), Sound.HORSE_DEATH, 1, 1);
  157. target.playSound(target.getLocation(), Sound.IRONGOLEM_DEATH, 1, 1);
  158. target.playSound(target.getLocation(), Sound.BAT_DEATH, 1, 1);
  159. target.playSound(target.getLocation(), Sound.BAT_HURT, 1, 1);
  160. target.playSound(target.getLocation(), Sound.BAT_IDLE, 1, 1);
  161. target.playSound(target.getLocation(), Sound.BAT_LOOP, 1, 1);
  162. target.playSound(target.getLocation(), Sound.PIG_DEATH, 1, 1);
  163. target.playSound(target.getLocation(), Sound.ENDERMAN_SCREAM, 1, 1);
  164. target.playSound(target.getLocation(), Sound.ENDERDRAGON_DEATH, 1, 1);
  165. target.playSound(target.getLocation(), Sound.WITHER_DEATH, 1, 1);
  166. target.playSound(target.getLocation(), Sound.HORSE_DEATH, 1, 1);
  167. target.playSound(target.getLocation(), Sound.IRONGOLEM_DEATH, 1, 1);
  168.  
  169. }else if(args.length == 1) {
  170. if(!p.hasPermission("ghostcraft.enderchest.other")){
  171. p.sendMessage("§4Dazu hast du keine Rechte!");
  172. return true;
  173. }
  174. if(target == null){
  175. p.sendMessage(Main.prefix + "Dieser Spieler ist nicht online!");
  176. return true;
  177. }
  178.  
  179. p.sendMessage(Main.prefix + "§7 Du hast die ohren von " + target.getName() + "§7zerfickt!");
  180.  
  181. }
  182.  
  183. return false;
  184. }
  185.  
  186. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement