Advertisement
Guest User

CW error

a guest
Jun 22nd, 2018
135
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 24.38 KB | None | 0 0
  1. 1031 */   public HashMap<String, Integer> arrows = new HashMap<String, Integer>();
  2. /*      */
  3. /*      */   @EventHandler
  4. /*      */   public void onPlayerInteract(PlayerInteractEvent ee) {
  5. /* 1035 */     final Player p = ee.getPlayer();
  6. /* 1036 */     if (p.getWorld().getName().endsWith("_cw")) {
  7. /* 1037 */       Action a = ee.getAction();
  8. /* 1038 */       if (this.team.hasPlayer(p)) {
  9. /* 1039 */         if ((a == Action.LEFT_CLICK_AIR) || (a == Action.LEFT_CLICK_BLOCK)) {
  10. /* 1040 */           if (p.getItemInHand().getType() == Material.BOW) {
  11. /* 1041 */             grasp(p);
  12. /* 1042 */           } else if ((p.getItemInHand().getType() != Material.BOW) && (p.getItemInHand().getType() != Material.STICK)) {
  13. /* 1043 */             Bukkit.getScheduler().cancelTask(this.Task);
  14. /* 1044 */             for (Entity en : p.getNearbyEntities(6.0D, 6.0D, 6.0D)) {
  15. /* 1045 */               ((LivingEntity)en).setMaximumNoDamageTicks(20);
  16. /*      */             }
  17. /*      */           }
  18. /*      */         }
  19. /*      */      
  20. /* 1050 */         if ((a == Action.RIGHT_CLICK_AIR) || (a == Action.RIGHT_CLICK_BLOCK)) {
  21. /* 1051 */           if (p.getItemInHand().getType() == Material.BOW) {
  22. /* 1052 */             if (!p.getInventory().contains(arrow())) {
  23. /* 1053 */               this.arrows.put(p.getName(), Integer.valueOf(0));
  24. /*      */             } else {
  25. /* 1055 */               this.arrows.put(p.getName(), Integer.valueOf(1));
  26. /*      */             }
  27. /* 1057 */             if (((Integer)this.arrows.get(p.getName())).intValue() == 0) {
  28. /* 1058 */               p.getInventory().addItem(new ItemStack[] { arrow() });
  29. /* 1059 */               this.arrows.put(p.getName(), Integer.valueOf(1));
  30. /*      */             }
  31. /*      */           }
  32. /* 1062 */           if (p.getItemInHand().getType() == Material.TRIPWIRE_HOOK) {
  33. /* 1063 */             throwhook(p, null, null);
  34. /* 1064 */             p.sendMessage(starter() + ChatColor.GOLD + "You threw chicken hook. You can use it again in 2 seconds.");
  35. /* 1065 */             p.getInventory().remove(fleshhook());
  36. /* 1066 */             Bukkit.getServer().getScheduler().scheduleSyncDelayedTask(this, new Runnable() {
  37. /*      */               public void run() {
  38. /* 1068 */                 p.getInventory().addItem(new ItemStack[] { ChickenWars.fleshhook() });
  39. /* 1069 */                 p.playSound(p.getLocation(), Sound.BLOCK_NOTE_PLING, 1.0F, 1.0F);
  40. /* 1070 */                 p.sendMessage(ChickenWars.starter() + ChatColor.GOLD + "You can now throw a chicken hook.");
  41. /*      */               }
  42. /* 1072 */             }, 40L);
  43. /*      */           }
  44. /* 1074 */           if (p.getItemInHand().getType() == Material.WOOD_PICKAXE) {
  45. /* 1075 */             p.getInventory().remove(woodpick());
  46. /* 1076 */             final int ID1 = Bukkit.getScheduler().scheduleSyncRepeatingTask(this, new Runnable() {
  47. /*      */               public void run() {
  48. /* 1078 */                 if ((!ChickenWars.this.proj.isDead()) && (
  49. /* 1079 */                   (ChickenWars.this.proj.getLocation().subtract(0.0D, 1.0D, 0.0D).getBlock().getType() == Material.AIR) ||
  50.                              (ChickenWars.this.proj.getLocation().add(0.0D, 1.0D, 0.0D).getBlock().getType() == Material.AIR) ||
  51.                              (ChickenWars.this.proj.getLocation().subtract(1.0D, 0.0D, 0.0D).getBlock().getType() == Material.AIR) ||
  52.                              (ChickenWars.this.proj.getLocation().add(1.0D, 0.0D, 0.0D).getBlock().getType() == Material.AIR) ||
  53.                              (ChickenWars.this.proj.getLocation().subtract(0.0D, 0.0D, 1.0D).getBlock().getType() == Material.AIR) ||
  54.                              (ChickenWars.this.proj.getLocation().add(0.0D, 0.0D, 1.0D).getBlock().getType() == Material.AIR)))
  55.                                 {
  56. /* 1080 */                   ChickenWars.this.proj.setVelocity(new Vector(0, 0, 0));
  57. /* 1081 */                   ChickenWars.this.eggs(ChickenWars.this.proj);
  58. /* 1082 */                   int j;
  59.                              for (Iterator localIterator = ChickenWars.this.proj.getNearbyEntities(150.0D, 150.0D, 150.0D).iterator();
  60.                                 localIterator.hasNext();
  61.                                 j <= 60); //syntax error, insert { to complete class body
  62.                              
  63. /*      */                   {
  64. /* 1082 */                     Entity en = (Entity)localIterator.next();
  65. /* 1083 */                     if ((!(en instanceof Player)) || (en == p))
  66. /*      */                       break;
  67. /* 1085 */                     Vector pull = ChickenWars.this.proj.getLocation().subtract(en.getLocation()).toVector().multiply(0.03D);
  68. /* 1086 */                     en.setVelocity(pull);
  69. /* 1087 */                     ((Player)en).playSound(en.getLocation(), Sound.ENTITY_IRONGOLEM_DEATH, 0.1F, 0.2F);
  70. /* 1088 */                     j = 0; continue;
  71. /* 1089 */                     Vector loca = ChickenWars.this.proj.getLocation().add(en.getLocation().add(0.0D, 1.5D, 0.0D)).toVector().divide(new Vector(j / 3, j / 3, j / 3));
  72. /* 1090 */                     ((Player)en).getWorld().playEffect(loca.toLocation(en.getWorld()), Effect.SMOKE, 1);j++;
  73. /*      */                   }
  74. /*      */                
  75. /*      */
  76. /*      */
  77. /*      */
  78. /* 1094 */                   if (ChickenWars.this.th == 1) {
  79. /* 1095 */                     for (Entity en : ChickenWars.this.proj.getNearbyEntities(150.0D, 150.0D, 150.0D)) {
  80. /* 1096 */                       if ((en instanceof Player)) {
  81. /* 1097 */                         ChickenWars.this.proj.getWorld().playSound(ChickenWars.this.proj.getLocation(), Sound.ENTITY_GENERIC_EXPLODE, 3.0F, 1.0F);
  82. /*      */                       }
  83. /*      */                     }
  84. /*      */                   }
  85. /* 1101 */                   ChickenWars.this.th += 1;
  86. /*      */                 }
  87. /*      */               }
  88. /* 1105 */             }, 0L, 1L); //syntax error, delete these tokens
  89.  
  90. /* 1106 */             final int ID2 = Bukkit.getScheduler().scheduleSyncRepeatingTask(this, new Runnable() {
  91. /*      */               public void run() {
  92. /* 1108 */                 if (!ChickenWars.this.proj.isDead()) {
  93. /* 1109 */                   if ((ChickenWars.this.proj.getLocation().subtract(0.0D, 1.0D, 0.0D).getBlock().getType() == Material.AIR) || (ChickenWars.this.proj.getLocation().add(0.0D, 1.0D, 0.0D).getBlock().getType() == Material.AIR) || (ChickenWars.this.proj.getLocation().subtract(1.0D, 0.0D, 0.0D).getBlock().getType() == Material.AIR) || (ChickenWars.this.proj.getLocation().add(1.0D, 0.0D, 0.0D).getBlock().getType() == Material.AIR) || (ChickenWars.this.proj.getLocation().subtract(0.0D, 0.0D, 1.0D).getBlock().getType() == Material.AIR) || (ChickenWars.this.proj.getLocation().add(0.0D, 0.0D, 1.0D).getBlock().getType() == Material.AIR)) {
  94. /* 1110 */                     ChickenWars.this.proj.getWorld().playEffect(ChickenWars.this.proj.getLocation(), Effect.STEP_SOUND, Material.SAND);
  95. /*      */                   }
  96. /*      */                
  97. /*      */
  98. /*      */                 }
  99. /*      */                 else {}
  100. /*      */               }
  101. /*      */            
  102. /* 1118 */             }, 0L, 3L);
  103. /* 1119 */             Bukkit.getServer().getScheduler().scheduleSyncDelayedTask(this, new Runnable() {
  104. /*      */               public void run() {
  105. /* 1121 */                 ChickenWars.this.proj.remove();
  106. /* 1122 */                 Bukkit.getScheduler().cancelTask(ID1);
  107. /* 1123 */                 Bukkit.getScheduler().cancelTask(ID2);
  108. /*      */               }
  109. /* 1125 */             }, 280L);
  110. /* 1126 */             Bukkit.getScheduler().scheduleSyncRepeatingTask(this, new Runnable() {
  111. /*      */               public void run() {
  112. /* 1128 */                 if ((ChickenWars.this.proj.isDead()) || (ChickenWars.this.proj.getLocation().subtract(0.0D, 1.0D, 0.0D).getBlock().getType() != Material.AIR) || (ChickenWars.this.proj.getLocation().add(0.0D, 1.0D, 0.0D).getBlock().getType() != Material.AIR) || (ChickenWars.this.proj.getLocation().subtract(1.0D, 0.0D, 0.0D).getBlock().getType() != Material.AIR) || (ChickenWars.this.proj.getLocation().add(1.0D, 0.0D, 0.0D).getBlock().getType() != Material.AIR) || (ChickenWars.this.proj.getLocation().subtract(0.0D, 0.0D, 1.0D).getBlock().getType() != Material.AIR) || (ChickenWars.this.proj.getLocation().add(0.0D, 0.0D, 1.0D).getBlock().getType() != Material.AIR)) {
  113. /* 1129 */                   Bukkit.getScheduler().cancelTask(ID1);
  114. /* 1130 */                   Bukkit.getScheduler().cancelTask(ID2);
  115. /*      */                 }
  116. /*      */               }
  117. /* 1133 */             }, 0L, 1L);
  118. /*      */           }
  119. /* 1135 */           if (p.getItemInHand().getType() == Material.IRON_PICKAXE) {
  120. /* 1136 */             this.bomb.put(p.getName(), Integer.valueOf(1));
  121. /* 1137 */             Bukkit.getScheduler().scheduleSyncDelayedTask(this, new Runnable() {
  122. /*      */               public void run() {
  123. /* 1139 */                 ChickenWars.this.bomb.put(p.getName(), Integer.valueOf(0));
  124. /*      */               }
  125. /* 1141 */             }, 6000L);
  126. /* 1142 */             this.th = 0;
  127. /* 1143 */             p.addPotionEffect(PotionEffectType.SATURATION.createEffect(20, 255));
  128. /* 1144 */             p.addPotionEffect(PotionEffectType.REGENERATION.createEffect(20, 255));
  129. /* 1145 */             p.getInventory().remove(ironpick());
  130. /* 1146 */             Bukkit.getServer().getScheduler().scheduleSyncDelayedTask(this, new Runnable() {
  131. /*      */               public void run() {
  132. /* 1148 */                 p.getInventory().addItem(new ItemStack[] { ChickenWars.woodpick() });
  133. /*      */               }
  134. /* 1150 */             }, 1L);
  135. /* 1151 */             this.proj = p.launchProjectile(Egg.class);
  136. /* 1152 */             this.proj.teleport(new Location(this.proj.getWorld(), this.proj.getLocation().getX(), this.proj.getLocation().add(0.0D, 1.0D, 0.0D).getY(), this.proj.getLocation().getZ()));
  137. /* 1153 */             this.proj.setVelocity(this.proj.getVelocity().multiply(0.9D));
  138. /* 1154 */             final int ID3 = Bukkit.getScheduler().scheduleSyncRepeatingTask(this, new Runnable() {
  139. /*      */               public void run() {
  140. /* 1156 */                 if ((!ChickenWars.this.proj.isDead()) && (
  141. /* 1157 */                   (ChickenWars.this.proj.getLocation().subtract(0.0D, 1.0D, 0.0D).getBlock().getType() != Material.AIR) ||
  142.                              (ChickenWars.this.proj.getLocation().add(0.0D, 1.0D, 0.0D).getBlock().getType() != Material.AIR) ||
  143.                              (ChickenWars.this.proj.getLocation().subtract(1.0D, 0.0D, 0.0D).getBlock().getType() != Material.AIR) ||
  144.                              (ChickenWars.this.proj.getLocation().add(1.0D, 0.0D, 0.0D).getBlock().getType() != Material.AIR) ||
  145.                              (ChickenWars.this.proj.getLocation().subtract(0.0D, 0.0D, 1.0D).getBlock().getType() != Material.AIR) ||
  146.                              (ChickenWars.this.proj.getLocation().add(0.0D, 0.0D, 1.0D).getBlock().getType() != Material.AIR)))
  147.                                 {
  148. /* 1158 */                   ChickenWars.this.proj.setVelocity(new Vector(0, 0, 0));
  149. /* 1159 */                   ChickenWars.this.eggs(ChickenWars.this.proj);
  150. /* 1160 */                   int j;
  151.                                 for (Iterator localIterator = ChickenWars.this.proj.getNearbyEntities(150.0D, 150.0D, 150.0D).iterator();
  152.                                 localIterator.hasNext();
  153.                                 j <= 60); //syntax error, insert } to complete class body
  154. /*      */                   {
  155. /* 1160 */                     Entity en = (Entity)localIterator.next();
  156. /* 1161 */                     if ((!(en instanceof Player)) || (en == p)) break;
  157. /* 1162 */                     Vector pull = ChickenWars.this.proj.getLocation().subtract(en.getLocation()).toVector().multiply(0.03D);
  158. /* 1163 */                     en.setVelocity(pull);
  159. /* 1164 */                     ((Player)en).playSound(en.getLocation(), Sound.ENTITY_IRONGOLEM_DEATH, 0.1F, 0.2F);
  160. /* 1165 */                     j = 0; continue;
  161. /* 1166 */                     Vector loca = ChickenWars.this.proj.getLocation().add(en.getLocation().add(0.0D, 1.5D, 0.0D)).toVector().divide(new Vector(j / 3, j / 3, j / 3));
  162. /* 1167 */                     ((Player)en).getWorld().playEffect(loca.toLocation(en.getWorld()), Effect.SMOKE, 1);
  163.                                j++;
  164. /*      */                   }
  165. /*      */                
  166. /*      */
  167. /*      */
  168. /*      */
  169. /* 1171 */                   if (ChickenWars.this.th == 1) {
  170. /* 1172 */                     for (Entity en : ChickenWars.this.proj.getNearbyEntities(150.0D, 150.0D, 150.0D)) {
  171. /* 1173 */                       if ((en instanceof Player)) {
  172. /* 1174 */                         ChickenWars.this.proj.getWorld().playSound(ChickenWars.this.proj.getLocation(), Sound.ENTITY_GENERIC_EXPLODE, 3.0F, 1.0F);
  173. /*      */                       }
  174. /*      */                     }
  175. /*      */                   }
  176. /* 1178 */                   ChickenWars.this.th += 1;
  177. /*      */                 } else {}
  178. /*      */               }
  179. /* 1182 */             }, 0L, 1L); //syntax error, delete these tokens
  180.  
  181. /* 1183 */             final int ID4 = Bukkit.getScheduler().scheduleSyncRepeatingTask(this, new Runnable() {
  182. /*      */               public void run() {
  183. /* 1185 */                 if ((!ChickenWars.this.proj.isDead()) && (
  184. /* 1186 */                   (ChickenWars.this.proj.getLocation().subtract(0.0D, 1.0D, 0.0D).getBlock().getType() != Material.AIR) || (ChickenWars.this.proj.getLocation().add(0.0D, 1.0D, 0.0D).getBlock().getType() != Material.AIR) || (ChickenWars.this.proj.getLocation().subtract(1.0D, 0.0D, 0.0D).getBlock().getType() != Material.AIR) || (ChickenWars.this.proj.getLocation().add(1.0D, 0.0D, 0.0D).getBlock().getType() != Material.AIR) || (ChickenWars.this.proj.getLocation().subtract(0.0D, 0.0D, 1.0D).getBlock().getType() != Material.AIR) || (ChickenWars.this.proj.getLocation().add(0.0D, 0.0D, 1.0D).getBlock().getType() != Material.AIR))) {
  185. /* 1187 */                   ChickenWars.this.proj.getWorld().playEffect(ChickenWars.this.proj.getLocation(), Effect.STEP_SOUND, Material.SAND);
  186. /*      */                 }
  187. /*      */              
  188. /*      */               }
  189. /* 1191 */             }, 0L, 3L);
  190. /* 1192 */             Bukkit.getServer().getScheduler().scheduleSyncDelayedTask(this, new Runnable() {
  191. /*      */               public void run() {
  192. /* 1194 */                 ChickenWars.this.proj.remove();
  193. /* 1195 */                 Bukkit.getScheduler().cancelTask(ID3);
  194. /* 1196 */                 Bukkit.getScheduler().cancelTask(ID4);
  195. /* 1197 */                 p.getInventory().remove(ChickenWars.woodpick());
  196. /*      */               }
  197. /* 1199 */             }, 280L);
  198. /* 1200 */             Bukkit.getScheduler().scheduleSyncRepeatingTask(this, new Runnable() {
  199. /*      */               public void run() {
  200. /* 1202 */                 if (ChickenWars.this.proj.isDead()) {
  201. /* 1203 */                   Bukkit.getScheduler().cancelTask(ID3);
  202. /* 1204 */                   Bukkit.getScheduler().cancelTask(ID4);
  203. /*      */                 }
  204. /*      */               }
  205. /* 1207 */             }, 0L, 1L);
  206. /*      */           } //syntax error, delete this token
  207. /* 1209 */           if (p.getItemInHand().getType() == Material.IRON_AXE) {
  208. /* 1210 */             spawnMOB(p);
  209. /* 1211 */             p.getInventory().removeItem(new ItemStack[] { ironaxe() });
  210. /* 1212 */             p.getInventory().addItem(new ItemStack[] { woodaxe() });
  211. /* 1213 */             p.sendMessage(starter() + ChatColor.GOLD + "You used guided chicken missle. You can use this again in 6 seconds or when you hit a player.");
  212. /* 1214 */             this.y.put(p.getName(), Integer.valueOf(0));
  213. /*      */          
  214. /* 1216 */             Bukkit.getServer().getScheduler().scheduleSyncDelayedTask(this, new Runnable() {
  215. /*      */               public void run() {
  216. /* 1218 */                 if ((((Integer)ChickenWars.this.y.get(p.getName())).intValue() == 0) &&
  217. /* 1219 */                   (p.getWorld().getName().endsWith("_cw")) && (!p.getInventory().contains(Material.IRON_AXE))) {
  218. /* 1220 */                   p.getInventory().removeItem(new ItemStack[] { ChickenWars.woodaxe() });
  219. /* 1221 */                   p.getInventory().addItem(new ItemStack[] { ChickenWars.ironaxe() });
  220. /* 1222 */                   p.sendMessage(ChickenWars.starter() + ChatColor.GOLD + "You can now use guided chicken missle.");
  221. /* 1223 */                   p.playSound(p.getLocation(), Sound.BLOCK_NOTE_PLING, 1.0F, 1.0F);
  222. /*      */                 }
  223. /*      */              
  224. /*      */               }
  225. /* 1227 */             }, 120L);
  226. /*      */           }
  227. /*      */        
  228. /* 1230 */           if (p.getItemInHand().getType() == Material.IRON_SWORD) {
  229. /* 1231 */             p.launchProjectile(Egg.class, p.getLocation().getDirection());
  230. /* 1232 */             p.getWorld().playSound(p.getLocation(), Sound.ENTITY_CHICKEN_EGG, 1.0F, 1.0F);
  231. /* 1233 */             Bukkit.getServer().getScheduler().scheduleSyncDelayedTask(this, new Runnable()
  232. /*      */             {
  233. /*      */               public void run() {
  234. /* 1236 */                 p.launchProjectile(Egg.class, p.getLocation().getDirection());
  235. /*      */              
  236. /* 1238 */                 p.getWorld().playSound(p.getLocation(), Sound.ENTITY_CHICKEN_EGG, 1.0F, 1.0F);
  237. /* 1239 */                 p.getInventory().removeItem(new ItemStack[] { ChickenWars.ironsword() });
  238. /* 1240 */                 p.getInventory().addItem(new ItemStack[] { ChickenWars.woodsword() });
  239. /* 1241 */                 p.sendMessage(ChickenWars.starter() + ChatColor.GOLD + "You used egg blaster. You can use this again in a 4 seconds.");
  240. /*      */               }
  241. /* 1243 */             }, 1L);
  242. /* 1244 */             Bukkit.getServer().getScheduler().scheduleSyncDelayedTask(this, new Runnable()
  243. /*      */             {
  244. /*      */               public void run() {
  245. /* 1247 */                 p.launchProjectile(Egg.class, p.getLocation().getDirection());
  246. /*      */              
  247. /* 1249 */                 p.getWorld().playSound(p.getLocation(), Sound.ENTITY_CHICKEN_EGG, 1.0F, 1.0F);
  248. /*      */               }
  249. /* 1251 */             }, 2L);
  250. /* 1252 */             Bukkit.getServer().getScheduler().scheduleSyncDelayedTask(this, new Runnable()
  251. /*      */             {
  252. /*      */               public void run() {
  253. /* 1255 */                 p.launchProjectile(Egg.class, p.getLocation().getDirection());
  254. /*      */              
  255. /* 1257 */                 p.getWorld().playSound(p.getLocation(), Sound.ENTITY_CHICKEN_EGG, 1.0F, 1.0F);
  256. /*      */               }
  257. /* 1259 */             }, 3L);
  258. /* 1260 */             Bukkit.getServer().getScheduler().scheduleSyncDelayedTask(this, new Runnable()
  259. /*      */             {
  260. /*      */               public void run() {
  261. /* 1263 */                 p.launchProjectile(Egg.class, p.getLocation().getDirection());
  262. /*      */              
  263. /* 1265 */                 p.getWorld().playSound(p.getLocation(), Sound.ENTITY_CHICKEN_EGG, 1.0F, 1.0F);
  264. /*      */               }
  265. /* 1267 */             }, 4L);
  266. /* 1268 */             Bukkit.getServer().getScheduler().scheduleSyncDelayedTask(this, new Runnable()
  267. /*      */             {
  268. /*      */               public void run() {
  269. /* 1271 */                 p.launchProjectile(Egg.class, p.getLocation().getDirection());
  270. /*      */              
  271. /* 1273 */                 p.getWorld().playSound(p.getLocation(), Sound.ENTITY_CHICKEN_EGG, 1.0F, 1.0F);
  272. /*      */               }
  273. /* 1275 */             }, 5L);
  274. /* 1276 */             Bukkit.getServer().getScheduler().scheduleSyncDelayedTask(this, new Runnable()
  275. /*      */             {
  276. /*      */               public void run() {
  277. /* 1279 */                 p.launchProjectile(Egg.class, p.getLocation().getDirection());
  278. /*      */              
  279. /* 1281 */                 p.getWorld().playSound(p.getLocation(), Sound.ENTITY_CHICKEN_EGG, 1.0F, 1.0F);
  280. /*      */               }
  281. /* 1283 */             }, 6L);
  282. /* 1284 */             Bukkit.getServer().getScheduler().scheduleSyncDelayedTask(this, new Runnable()
  283. /*      */             {
  284. /*      */               public void run() {
  285. /* 1287 */                 p.launchProjectile(Egg.class, p.getLocation().getDirection());
  286. /*      */              
  287. /* 1289 */                 p.getWorld().playSound(p.getLocation(), Sound.ENTITY_CHICKEN_EGG, 1.0F, 1.0F);
  288. /*      */               }
  289. /* 1291 */             }, 7L);
  290. /* 1292 */             Bukkit.getServer().getScheduler().scheduleSyncDelayedTask(this, new Runnable()
  291. /*      */             {
  292. /*      */               public void run() {
  293. /* 1295 */                 p.launchProjectile(Egg.class, p.getLocation().getDirection());
  294. /*      */              
  295. /* 1297 */                 p.getWorld().playSound(p.getLocation(), Sound.ENTITY_CHICKEN_EGG, 1.0F, 1.0F);
  296. /*      */               }
  297. /* 1299 */             }, 8L);
  298. /* 1300 */             Bukkit.getServer().getScheduler().scheduleSyncDelayedTask(this, new Runnable()
  299. /*      */             {
  300. /*      */               public void run() {
  301. /* 1303 */                 p.launchProjectile(Egg.class, p.getLocation().getDirection());
  302. /*      */              
  303. /* 1305 */                 p.getWorld().playSound(p.getLocation(), Sound.ENTITY_CHICKEN_EGG, 1.0F, 1.0F);
  304. /*      */               }
  305. /* 1307 */             }, 9L);
  306. /* 1308 */             Bukkit.getServer().getScheduler().scheduleSyncDelayedTask(this, new Runnable()
  307. /*      */             {
  308. /*      */               public void run() {
  309. /* 1311 */                 p.launchProjectile(Egg.class, p.getLocation().getDirection());
  310. /*      */              
  311. /* 1313 */                 p.getWorld().playSound(p.getLocation(), Sound.ENTITY_CHICKEN_EGG, 1.0F, 1.0F);
  312. /*      */               }
  313. /* 1315 */             }, 10L);
  314. /* 1316 */             Bukkit.getServer().getScheduler().scheduleSyncDelayedTask(this, new Runnable()
  315. /*      */             {
  316. /*      */               public void run() {
  317. /* 1319 */                 p.launchProjectile(Egg.class, p.getLocation().getDirection());
  318. /*      */              
  319. /* 1321 */                 p.getWorld().playSound(p.getLocation(), Sound.ENTITY_CHICKEN_EGG, 1.0F, 1.0F);
  320. /*      */               }
  321. /* 1323 */             }, 11L);
  322. /* 1324 */             Bukkit.getServer().getScheduler().scheduleSyncDelayedTask(this, new Runnable()
  323. /*      */             {
  324. /*      */               public void run() {
  325. /* 1327 */                 p.launchProjectile(Egg.class, p.getLocation().getDirection());
  326. /*      */              
  327. /* 1329 */                 p.getWorld().playSound(p.getLocation(), Sound.ENTITY_CHICKEN_EGG, 1.0F, 1.0F);
  328. /*      */               }
  329. /* 1331 */             }, 12L);
  330. /* 1332 */             Bukkit.getServer().getScheduler().scheduleSyncDelayedTask(this, new Runnable()
  331. /*      */             {
  332. /*      */               public void run() {
  333. /* 1335 */                 p.launchProjectile(Egg.class, p.getLocation().getDirection());
  334. /*      */              
  335. /* 1337 */                 p.getWorld().playSound(p.getLocation(), Sound.ENTITY_CHICKEN_EGG, 1.0F, 1.0F);
  336. /*      */               }
  337. /* 1339 */             }, 13L);
  338. /* 1340 */             Bukkit.getServer().getScheduler().scheduleSyncDelayedTask(this, new Runnable()
  339. /*      */             {
  340. /*      */               public void run() {
  341. /* 1343 */                 p.launchProjectile(Egg.class, p.getLocation().getDirection());
  342. /*      */              
  343. /* 1345 */                 p.getWorld().playSound(p.getLocation(), Sound.ENTITY_CHICKEN_EGG, 1.0F, 1.0F);
  344. /*      */               }
  345. /* 1347 */             }, 14L);
  346. /* 1348 */             Bukkit.getServer().getScheduler().scheduleSyncDelayedTask(this, new Runnable()
  347. /*      */             {
  348. /*      */               public void run() {
  349. /* 1351 */                 if (p.getWorld().getName().endsWith("_cw")) {
  350. /* 1352 */                   p.getInventory().removeItem(new ItemStack[] { ChickenWars.woodsword() });
  351. /* 1353 */                   p.getInventory().addItem(new ItemStack[] { ChickenWars.ironsword() });
  352. /* 1354 */                   p.sendMessage(ChickenWars.starter() + ChatColor.GOLD + "You can now use egg blaster.");
  353. /* 1355 */                   p.playSound(p.getLocation(), Sound.BLOCK_NOTE_PLING, 1.0F, 1.0F);
  354. /*      */                 }
  355. /*      */               }
  356. /* 1358 */             }, 74L); //insert } to complete statement
  357. /*      */           }
  358. /*      */         }
  359. /*      */       }
  360. /*      */     }
  361. /*      */   }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement