Advertisement
Tom2565

Untitled

Jan 3rd, 2017
12,287
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 65.38 KB | None | 0 0
  1. /* */ package me.bildung.shop;
  2. /* */
  3. /* */ import java.util.Iterator;
  4. /* */ import org.bukkit.Location;
  5. /* */ import org.bukkit.Material;
  6. /* */ import org.bukkit.Sound;
  7. /* */ import org.bukkit.enchantments.Enchantment;
  8. /* */ import org.bukkit.entity.Player;
  9. /* */ import org.bukkit.event.inventory.InventoryClickEvent;
  10. /* */ import org.bukkit.inventory.Inventory;
  11. /* */ import org.bukkit.inventory.ItemStack;
  12. /* */ import org.bukkit.inventory.PlayerInventory;
  13. /* */ import org.bukkit.inventory.meta.ItemMeta;
  14.  
  15. import me.bildung.main.ItemCreator;
  16. import me.bildung.main.Main;
  17. import me.bildung.main.Util;
  18. import me.bildung.manager.ScoreboardManager;
  19. import me.bildung.manager.ShineManager;
  20. /* */
  21. /* */ public class ShopClick implements org.bukkit.event.Listener
  22. /* */ {
  23. /* */ @org.bukkit.event.EventHandler
  24. /* */ public void onClickShop(InventoryClickEvent e)
  25. /* */ {
  26. /* 25 */ Player p = (Player)e.getWhoClicked();
  27. /* 26 */ Inventory inv = e.getInventory();
  28. /* 27 */ ItemStack item = e.getCurrentItem();
  29. /* */
  30. /* 29 */ if (inv.getName().equalsIgnoreCase("§6§lShop")) {
  31. /* 30 */ e.setCancelled(true);
  32. /* 31 */ if (item.getType() == Material.STAINED_GLASS_PANE) {
  33. /* 32 */ return;
  34. /* */ }
  35. /* 34 */ if (item.getType() == Material.DIAMOND_PICKAXE) {
  36. /* 35 */ ShopInventoryWrapper.openItemShop(p);
  37. /* 36 */ p.playSound(p.getLocation(), Sound.NOTE_PIANO, 1.0F, 1.0F);
  38. /* */ }
  39. /* 38 */ if (item.getType() == Material.DIAMOND_SWORD) {
  40. /* 39 */ ShopInventoryWrapper.openKitShop(p);
  41. /* 40 */ p.playSound(p.getLocation(), Sound.NOTE_PIANO, 1.0F, 1.0F);
  42. /* */ }
  43. /* 42 */ if (item.getType() == Material.NOTE_BLOCK) {
  44. /* 43 */ ShopInventoryWrapper.openExtracmdShop(p);
  45. /* 44 */ p.playSound(p.getLocation(), Sound.NOTE_PIANO, 1.0F, 1.0F);
  46. /* */ }
  47. /* 46 */ if (item.getType() == Material.DIAMOND_HELMET) {
  48. /* 47 */ ShopInventoryWrapper.openRankShop(p);
  49. /* 48 */ p.playSound(p.getLocation(), Sound.NOTE_PIANO, 1.0F, 1.0F);
  50. /* */ }
  51. /* */ }
  52. /* 51 */ if (inv.getName().equalsIgnoreCase("§6§lItem-Shop")) {
  53. /* 52 */ e.setCancelled(true);
  54. /* 53 */ if (item.getType() == Material.BREWING_STAND_ITEM) {
  55. /* 54 */ ShopInventoryWrapper.openItemBrewShop(p);
  56. /* 55 */ p.playSound(p.getLocation(), Sound.NOTE_PIANO, 1.0F, 1.0F);
  57. /* */ }
  58. /* 57 */ if (item.getType() == Material.DIAMOND_AXE) {
  59. /* 58 */ ShopInventoryWrapper.openItemToolShop(p);
  60. /* 59 */ p.playSound(p.getLocation(), Sound.NOTE_PIANO, 1.0F, 1.0F);
  61. /* */ }
  62. /* 61 */ if (item.getType() == Material.STONE) {
  63. /* 62 */ ShopInventoryWrapper.openItemBlockShop(p);
  64. /* 63 */ p.playSound(p.getLocation(), Sound.NOTE_PIANO, 1.0F, 1.0F);
  65. /* */ }
  66. /* 65 */ if (item.getType() == Material.EMERALD) {
  67. /* 66 */ ShopInventoryWrapper.openItemErzeShop(p);
  68. /* 67 */ p.playSound(p.getLocation(), Sound.NOTE_PIANO, 1.0F, 1.0F);
  69. /* */ }
  70. /* 69 */ if (item.getType() == Material.WOOD_DOOR) {
  71. /* 70 */ ShopInventoryWrapper.openMainShop(p);
  72. /* */ }
  73. /* */ }
  74. /* 73 */ if (inv.getName().equalsIgnoreCase("§6§lItem-Brau-Shop")) {
  75. /* 74 */ e.setCancelled(true);
  76. /* 75 */ if (item.getType() == Material.BREWING_STAND_ITEM) {
  77. /* 76 */ if ((e.isLeftClick()) && (e.isShiftClick())) {
  78. /* 77 */ if (ShineManager.getMoney(p) <= 9600L) {
  79. /* 78 */ p.playSound(p.getLocation(), Sound.NOTE_BASS, 1.0F, 1.0F);
  80. /* 79 */ p.sendMessage(Main.pre + "§cDu besitzt nicht genuegend Shines.");
  81. /* 80 */ return;
  82. /* */ }
  83. /* 82 */ ShineManager.removeMoney(p, 9600L);
  84. /* 83 */ ScoreboardManager.updateScoreboard(p);
  85. /* 84 */ Util.addItem(p, new ItemCreator().material(item.getType()).amount(64).build());
  86. /* 85 */ p.playSound(p.getLocation(), Sound.NOTE_PLING, 1.0F, 1.0F);
  87. /* 86 */ p.sendMessage(Main.pre + "§7Du hast dir 64x §e" + item.getType() + "§7 gekauft.");
  88. /* 87 */ return;
  89. /* */ }
  90. /* 89 */ if (e.isLeftClick()) {
  91. /* 90 */ int free = 0;
  92. /* 91 */ for (ItemStack istack : p.getInventory()) {
  93. /* 92 */ if (istack == null) {
  94. /* 93 */ free++;
  95. /* */ }
  96. /* */ }
  97. /* 96 */ if (free == 0) {
  98. /* 97 */ p.sendMessage(Main.pre + "§cDu hast nicht genuegend Platz in deinem Inventar.");
  99. /* 98 */ return;
  100. /* */ }
  101. /* 100 */ if (ShineManager.getMoney(p) <= 150L) {
  102. /* 101 */ p.playSound(p.getLocation(), Sound.NOTE_BASS, 1.0F, 1.0F);
  103. /* 102 */ p.sendMessage(Main.pre + "§cDu besitzt nicht genuegend Shines.");
  104. /* 103 */ return;
  105. /* */ }
  106. /* 105 */ ShineManager.removeMoney(p, 150L);
  107. /* 106 */ ScoreboardManager.updateScoreboard(p);
  108. /* 107 */ Util.addItem(p, new ItemCreator().material(item.getType()).build());
  109. /* 108 */ p.playSound(p.getLocation(), Sound.NOTE_PLING, 1.0F, 1.0F);
  110. /* 109 */ p.sendMessage(Main.pre + "§7Du hast dir 1x §e" + item.getType() + "§7 gekauft.");
  111. /* 110 */ return;
  112. /* */ }
  113. /* */ }
  114. /* 113 */ if (item.getType() == Material.BLAZE_ROD) {
  115. /* 114 */ if ((e.isLeftClick()) && (e.isShiftClick())) {
  116. /* 115 */ int free = 0;
  117. /* 116 */ for (ItemStack istack : p.getInventory()) {
  118. /* 117 */ if (istack == null) {
  119. /* 118 */ free++;
  120. /* */ }
  121. /* */ }
  122. /* 121 */ if (free == 0) {
  123. /* 122 */ p.sendMessage(Main.pre + "§cDu hast nicht genuegend Platz in deinem Inventar.");
  124. /* 123 */ return;
  125. /* */ }
  126. /* 125 */ if (ShineManager.getMoney(p) <= 9600L) {
  127. /* 126 */ p.playSound(p.getLocation(), Sound.NOTE_BASS, 1.0F, 1.0F);
  128. /* 127 */ p.sendMessage(Main.pre + "§cDu besitzt nicht genuegend Shines.");
  129. /* 128 */ return;
  130. /* */ }
  131. /* 130 */ ShineManager.removeMoney(p, 9600L);
  132. /* 131 */ ScoreboardManager.updateScoreboard(p);
  133. /* 132 */ Util.addItem(p, new ItemCreator().material(item.getType()).amount(64).build());
  134. /* 133 */ p.playSound(p.getLocation(), Sound.NOTE_PLING, 1.0F, 1.0F);
  135. /* 134 */ p.sendMessage(Main.pre + "§7Du hast dir 64x §e" + item.getType() + "§7 gekauft.");
  136. /* 135 */ return;
  137. /* */ }
  138. /* 137 */ if (e.isLeftClick()) {
  139. /* 138 */ int free = 0;
  140. /* 139 */ for (ItemStack istack : p.getInventory()) {
  141. /* 140 */ if (istack == null) {
  142. /* 141 */ free++;
  143. /* */ }
  144. /* */ }
  145. /* 144 */ if (free == 0) {
  146. /* 145 */ p.sendMessage(Main.pre + "§cDu hast nicht genuegend Platz in deinem Inventar.");
  147. /* 146 */ return;
  148. /* */ }
  149. /* 148 */ if (ShineManager.getMoney(p) <= 150L) {
  150. /* 149 */ p.playSound(p.getLocation(), Sound.NOTE_BASS, 1.0F, 1.0F);
  151. /* 150 */ p.sendMessage(Main.pre + "§cDu besitzt nicht genuegend Shines.");
  152. /* 151 */ return;
  153. /* */ }
  154. /* 153 */ ShineManager.removeMoney(p, 150L);
  155. /* 154 */ ScoreboardManager.updateScoreboard(p);
  156. /* 155 */ Util.addItem(p, new ItemCreator().material(item.getType()).build());
  157. /* 156 */ p.playSound(p.getLocation(), Sound.NOTE_PLING, 1.0F, 1.0F);
  158. /* 157 */ p.sendMessage(Main.pre + "§7Du hast dir 1x §e" + item.getType() + "§7 gekauft.");
  159. /* 158 */ return;
  160. /* */ }
  161. /* */ }
  162. /* */
  163. /* 162 */ if (item.getType() == Material.WOOD_DOOR) {
  164. /* 163 */ ShopInventoryWrapper.openItemShop(p);
  165. /* 164 */ } else if (item.getType() != Material.STAINED_GLASS_PANE) {
  166. /* 165 */ if (!inv.contains(item.getType())) {
  167. /* 166 */ e.setCancelled(true);
  168. /* 167 */ return;
  169. /* */ }
  170. /* 169 */ if ((e.isLeftClick()) && (e.isShiftClick())) {
  171. /* 170 */ int free = 0;
  172. /* 171 */ for (ItemStack istack : p.getInventory()) {
  173. /* 172 */ if (istack == null) {
  174. /* 173 */ free++;
  175. /* */ }
  176. /* */ }
  177. /* 176 */ if (free == 0) {
  178. /* 177 */ p.sendMessage(Main.pre + "§cDu hast nicht genuegend Platz in deinem Inventar.");
  179. /* 178 */ return;
  180. /* */ }
  181. /* 180 */ if (ShineManager.getMoney(p) <= 3200L) {
  182. /* 181 */ p.playSound(p.getLocation(), Sound.NOTE_BASS, 1.0F, 1.0F);
  183. /* 182 */ p.sendMessage(Main.pre + "§cDu besitzt nicht genuegend Shines.");
  184. /* 183 */ return;
  185. /* */ }
  186. /* 185 */ ShineManager.removeMoney(p, 3200L);
  187. /* 186 */ ScoreboardManager.updateScoreboard(p);
  188. /* 187 */ Util.addItem(p, new ItemCreator().material(item.getType()).amount(64).build());
  189. /* 188 */ p.playSound(p.getLocation(), Sound.NOTE_PLING, 1.0F, 1.0F);
  190. /* 189 */ p.sendMessage(Main.pre + "§7Du hast dir 64x §e" + item.getType() + "§7 gekauft.");
  191. /* 190 */ return;
  192. /* */ }
  193. /* 192 */ if (e.isLeftClick()) {
  194. /* 193 */ int free = 0;
  195. /* 194 */ for (ItemStack istack : p.getInventory()) {
  196. /* 195 */ if (istack == null) {
  197. /* 196 */ free++;
  198. /* */ }
  199. /* */ }
  200. /* 199 */ if (free == 0) {
  201. /* 200 */ p.sendMessage(Main.pre + "§cDu hast nicht genuegend Platz in deinem Inventar.");
  202. /* 201 */ return;
  203. /* */ }
  204. /* 203 */ if (ShineManager.getMoney(p) <= 50L) {
  205. /* 204 */ p.playSound(p.getLocation(), Sound.NOTE_BASS, 1.0F, 1.0F);
  206. /* 205 */ p.sendMessage(Main.pre + "§cDu besitzt nicht genuegend Shines.");
  207. /* 206 */ return;
  208. /* */ }
  209. /* 208 */ ShineManager.removeMoney(p, 50L);
  210. /* 209 */ ScoreboardManager.updateScoreboard(p);
  211. /* 210 */ Util.addItem(p, new ItemCreator().material(item.getType()).build());
  212. /* 211 */ p.playSound(p.getLocation(), Sound.NOTE_PLING, 1.0F, 1.0F);
  213. /* 212 */ p.sendMessage(Main.pre + "§7Du hast dir 1x §e" + item.getType() + "§7 gekauft.");
  214. /* 213 */ return;
  215. /* */ }
  216. /* */ }
  217. /* */ }
  218. /* 217 */ if (inv.getName().equalsIgnoreCase("§6§lItem-Tool-Shop")) {
  219. /* 218 */ e.setCancelled(true);
  220. /* 219 */ if (item.getType() == Material.DIAMOND_SWORD) {
  221. /* 220 */ if ((e.isLeftClick()) && (e.isShiftClick())) {
  222. /* 221 */ int free = 0;
  223. /* 222 */ for (ItemStack istack : p.getInventory()) {
  224. /* 223 */ if (istack == null) {
  225. /* 224 */ free++;
  226. /* */ }
  227. /* */ }
  228. /* 227 */ if (free == 0) {
  229. /* 228 */ p.sendMessage(Main.pre + "§cDu hast nicht genuegend Platz in deinem Inventar.");
  230. /* 229 */ return;
  231. /* */ }
  232. /* 231 */ if (ShineManager.getMoney(p) <= 160000L) {
  233. /* 232 */ p.playSound(p.getLocation(), Sound.NOTE_BASS, 1.0F, 1.0F);
  234. /* 233 */ p.sendMessage(Main.pre + "§cDu besitzt nicht genuegend Shines.");
  235. /* 234 */ return;
  236. /* */ }
  237. /* 236 */ ShineManager.removeMoney(p, 160000L);
  238. /* 237 */ ScoreboardManager.updateScoreboard(p);
  239. /* 238 */ Util.addItem(p, new ItemCreator().material(item.getType()).amount(64).build());
  240. /* 239 */ p.playSound(p.getLocation(), Sound.NOTE_PLING, 1.0F, 1.0F);
  241. /* 240 */ p.sendMessage(Main.pre + "§7Du hast dir 64x §e" + item.getType() + "§7 gekauft.");
  242. /* 241 */ return;
  243. /* */ }
  244. /* 243 */ if (e.isLeftClick()) {
  245. /* 244 */ int free = 0;
  246. /* 245 */ for (ItemStack istack : p.getInventory()) {
  247. /* 246 */ if (istack == null) {
  248. /* 247 */ free++;
  249. /* */ }
  250. /* */ }
  251. /* 250 */ if (free == 0) {
  252. /* 251 */ p.sendMessage(Main.pre + "§cDu hast nicht genuegend Platz in deinem Inventar.");
  253. /* 252 */ return;
  254. /* */ }
  255. /* 254 */ if (ShineManager.getMoney(p) <= 2500L) {
  256. /* 255 */ p.playSound(p.getLocation(), Sound.NOTE_BASS, 1.0F, 1.0F);
  257. /* 256 */ p.sendMessage(Main.pre + "§cDu besitzt nicht genuegend Shines.");
  258. /* 257 */ return;
  259. /* */ }
  260. /* 259 */ ShineManager.removeMoney(p, 2500L);
  261. /* 260 */ ScoreboardManager.updateScoreboard(p);
  262. /* 261 */ Util.addItem(p, new ItemCreator().material(item.getType()).build());
  263. /* 262 */ p.playSound(p.getLocation(), Sound.NOTE_PLING, 1.0F, 1.0F);
  264. /* 263 */ p.sendMessage(Main.pre + "§7Du hast dir 1x §e" + item.getType() + "§7 gekauft.");
  265. /* 264 */ return;
  266. /* */ }
  267. /* */ }
  268. /* 267 */ if (item.getType() == Material.ARROW) {
  269. /* 268 */ if ((e.isLeftClick()) && (e.isShiftClick())) {
  270. /* 269 */ int free = 0;
  271. /* 270 */ for (ItemStack istack : p.getInventory()) {
  272. /* 271 */ if (istack == null) {
  273. /* 272 */ free++;
  274. /* */ }
  275. /* */ }
  276. /* 275 */ if (free == 0) {
  277. /* 276 */ p.sendMessage(Main.pre + "§cDu hast nicht genuegend Platz in deinem Inventar.");
  278. /* 277 */ return;
  279. /* */ }
  280. /* 279 */ if (ShineManager.getMoney(p) <= 320L) {
  281. /* 280 */ p.playSound(p.getLocation(), Sound.NOTE_BASS, 1.0F, 1.0F);
  282. /* 281 */ p.sendMessage(Main.pre + "§cDu besitzt nicht genuegend Shines.");
  283. /* 282 */ return;
  284. /* */ }
  285. /* 284 */ ShineManager.removeMoney(p, 320L);
  286. /* 285 */ ScoreboardManager.updateScoreboard(p);
  287. /* 286 */ Util.addItem(p, new ItemCreator().material(item.getType()).amount(64).build());
  288. /* 287 */ p.playSound(p.getLocation(), Sound.NOTE_PLING, 1.0F, 1.0F);
  289. /* 288 */ p.sendMessage(Main.pre + "§7Du hast dir 64x §e" + item.getType() + "§7 gekauft.");
  290. /* 289 */ return;
  291. /* */ }
  292. /* 291 */ if (e.isLeftClick()) {
  293. /* 292 */ int free = 0;
  294. /* 293 */ for (ItemStack istack : p.getInventory()) {
  295. /* 294 */ if (istack == null) {
  296. /* 295 */ free++;
  297. /* */ }
  298. /* */ }
  299. /* 298 */ if (free == 0) {
  300. /* 299 */ p.sendMessage(Main.pre + "§cDu hast nicht genuegend Platz in deinem Inventar.");
  301. /* 300 */ return;
  302. /* */ }
  303. /* 302 */ if (ShineManager.getMoney(p) <= 5L) {
  304. /* 303 */ p.playSound(p.getLocation(), Sound.NOTE_BASS, 1.0F, 1.0F);
  305. /* 304 */ p.sendMessage(Main.pre + "§cDu besitzt nicht genuegend Shines.");
  306. /* 305 */ return;
  307. /* */ }
  308. /* 307 */ ShineManager.removeMoney(p, 5L);
  309. /* 308 */ ScoreboardManager.updateScoreboard(p);
  310. /* 309 */ Util.addItem(p, new ItemCreator().material(item.getType()).build());
  311. /* 310 */ p.playSound(p.getLocation(), Sound.NOTE_PLING, 1.0F, 1.0F);
  312. /* 311 */ p.sendMessage(Main.pre + "§7Du hast dir 1x §e" + item.getType() + "§7 gekauft.");
  313. /* 312 */ return;
  314. /* */ }
  315. /* */ }
  316. /* 315 */ if (item.getType() == Material.WOOD_DOOR) {
  317. /* 316 */ ShopInventoryWrapper.openItemShop(p);
  318. /* 317 */ } else if (item.getType() != Material.STAINED_GLASS_PANE) {
  319. /* 318 */ if (!inv.contains(item.getType())) {
  320. /* 319 */ e.setCancelled(true);
  321. /* 320 */ return;
  322. /* */ }
  323. /* 322 */ if ((e.isLeftClick()) && (e.isShiftClick())) {
  324. /* 323 */ int free = 0;
  325. /* 324 */ for (ItemStack istack : p.getInventory()) {
  326. /* 325 */ if (istack == null) {
  327. /* 326 */ free++;
  328. /* */ }
  329. /* */ }
  330. /* 329 */ if (free == 0) {
  331. /* 330 */ p.sendMessage(Main.pre + "§cDu hast nicht genuegend Platz in deinem Inventar.");
  332. /* 331 */ return;
  333. /* */ }
  334. /* 333 */ if (ShineManager.getMoney(p) <= 160000L) {
  335. /* 334 */ p.playSound(p.getLocation(), Sound.NOTE_BASS, 1.0F, 1.0F);
  336. /* 335 */ p.sendMessage(Main.pre + "§cDu besitzt nicht genuegend Shines.");
  337. /* 336 */ return;
  338. /* */ }
  339. /* 338 */ ShineManager.removeMoney(p, 160000L);
  340. /* 339 */ ScoreboardManager.updateScoreboard(p);
  341. /* 340 */ if ((item.getType() == Material.DIAMOND_HELMET) || (item.getType() == Material.DIAMOND_CHESTPLATE) || (item.getType() == Material.DIAMOND_LEGGINGS) || (item.getType() == Material.DIAMOND_BOOTS) || (item.getType() == Material.DIAMOND_CHESTPLATE)) {
  342. /* 341 */ Util.addItem(p, new ItemCreator().material(item.getType()).amount(64).build());
  343. /* 342 */ } else if ((item.getType() == Material.DIAMOND_PICKAXE) || (item.getType() == Material.DIAMOND_SPADE) || (item.getType() == Material.DIAMOND_AXE) || (item.getType() == Material.DIAMOND_HOE)) {
  344. /* 343 */ Util.addItem(p, new ItemCreator().material(item.getType()).amount(64).build());
  345. /* 344 */ } else if (item.getType() == Material.BOW) {
  346. /* 345 */ Util.addItem(p, new ItemCreator().material(item.getType()).amount(64).build());
  347. /* */ } else {
  348. /* 347 */ Util.addItem(p, new ItemCreator().material(item.getType()).build());
  349. /* */ }
  350. /* 349 */ p.playSound(p.getLocation(), Sound.NOTE_PLING, 1.0F, 1.0F);
  351. /* 350 */ p.sendMessage(Main.pre + "§7Du hast dir 64x §e" + item.getType() + "§7 gekauft.");
  352. /* 351 */ return;
  353. /* */ }
  354. /* 353 */ if (e.isLeftClick()) {
  355. /* 354 */ int free = 0;
  356. /* 355 */ for (ItemStack istack : p.getInventory()) {
  357. /* 356 */ if (istack == null) {
  358. /* 357 */ free++;
  359. /* */ }
  360. /* */ }
  361. /* 360 */ if (free == 0) {
  362. /* 361 */ p.sendMessage(Main.pre + "§cDu hast nicht genuegend Platz in deinem Inventar.");
  363. /* 362 */ return;
  364. /* */ }
  365. /* 364 */ if (ShineManager.getMoney(p) <= 2500L) {
  366. /* 365 */ p.playSound(p.getLocation(), Sound.NOTE_BASS, 1.0F, 1.0F);
  367. /* 366 */ p.sendMessage(Main.pre + "§cDu besitzt nicht genuegend Shines.");
  368. /* 367 */ return;
  369. /* */ }
  370. /* 369 */ ShineManager.removeMoney(p, 2500L);
  371. /* 370 */ ScoreboardManager.updateScoreboard(p);
  372. /* 371 */ Util.addItem(p, new ItemCreator().material(item.getType()).build());
  373. /* 372 */ p.playSound(p.getLocation(), Sound.NOTE_PLING, 1.0F, 1.0F);
  374. /* 373 */ p.sendMessage(Main.pre + "§7Du hast dir 1x §e" + item.getType() + "§7 gekauft.");
  375. /* 374 */ return;
  376. /* */ }
  377. /* */ }
  378. /* */ }
  379. /* 378 */ if (inv.getName().equalsIgnoreCase("§6§lItem-Block-Shop")) {
  380. /* 379 */ e.setCancelled(true);
  381. /* 380 */ if (item.getType() == Material.MOB_SPAWNER) {
  382. /* 381 */ if ((e.isLeftClick()) && (e.isShiftClick())) {
  383. /* 382 */ int free = 0;
  384. /* 383 */ for (ItemStack istack : p.getInventory()) {
  385. /* 384 */ if (istack == null) {
  386. /* 385 */ free++;
  387. /* */ }
  388. /* */ }
  389. /* 388 */ if (free == 0) {
  390. /* 389 */ p.sendMessage(Main.pre + "§cDu hast nicht genuegend Platz in deinem Inventar.");
  391. /* 390 */ return;
  392. /* */ }
  393. /* 392 */ if (ShineManager.getMoney(p) <= 1920000L) {
  394. /* 393 */ p.playSound(p.getLocation(), Sound.NOTE_BASS, 1.0F, 1.0F);
  395. /* 394 */ p.sendMessage(Main.pre + "§cDu besitzt nicht genuegend Shines.");
  396. /* 395 */ return;
  397. /* */ }
  398. /* 397 */ ShineManager.removeMoney(p, 1920000L);
  399. /* 398 */ ScoreboardManager.updateScoreboard(p);
  400. /* 399 */ Util.addItem(p, new ItemCreator().material(item.getType()).amount(64).build());
  401. /* 400 */ p.playSound(p.getLocation(), Sound.NOTE_PLING, 1.0F, 1.0F);
  402. /* 401 */ p.sendMessage(Main.pre + "§7Du hast dir 64x §e" + item.getType() + "§7 gekauft.");
  403. /* 402 */ return;
  404. /* */ }
  405. /* 404 */ if (e.isLeftClick()) {
  406. /* 405 */ int free = 0;
  407. /* 406 */ for (ItemStack istack : p.getInventory()) {
  408. /* 407 */ if (istack == null) {
  409. /* 408 */ free++;
  410. /* */ }
  411. /* */ }
  412. /* 411 */ if (free == 0) {
  413. /* 412 */ p.sendMessage(Main.pre + "§cDu hast nicht genuegend Platz in deinem Inventar.");
  414. /* 413 */ return;
  415. /* */ }
  416. /* 415 */ if (ShineManager.getMoney(p) <= 30000L) {
  417. /* 416 */ p.playSound(p.getLocation(), Sound.NOTE_BASS, 1.0F, 1.0F);
  418. /* 417 */ p.sendMessage(Main.pre + "§cDu besitzt nicht genuegend Shines.");
  419. /* 418 */ return;
  420. /* */ }
  421. /* 420 */ ShineManager.removeMoney(p, 30000L);
  422. /* 421 */ ScoreboardManager.updateScoreboard(p);
  423. /* 422 */ Util.addItem(p, new ItemCreator().material(item.getType()).build());
  424. /* 423 */ p.playSound(p.getLocation(), Sound.NOTE_PLING, 1.0F, 1.0F);
  425. /* 424 */ p.sendMessage(Main.pre + "§7Du hast dir 1x §e" + item.getType() + "§7 gekauft.");
  426. /* 425 */ return;
  427. /* */ }
  428. /* */ }
  429. /* 428 */ if (item.getType() == Material.BEDROCK) {
  430. /* 429 */ if ((e.isLeftClick()) && (e.isShiftClick())) {
  431. /* 430 */ int free = 0;
  432. /* 431 */ for (ItemStack istack : p.getInventory()) {
  433. /* 432 */ if (istack == null) {
  434. /* 433 */ free++;
  435. /* */ }
  436. /* */ }
  437. /* 436 */ if (free == 0) {
  438. /* 437 */ p.sendMessage(Main.pre + "§cDu hast nicht genuegend Platz in deinem Inventar.");
  439. /* 438 */ return;
  440. /* */ }
  441. /* 440 */ if (ShineManager.getMoney(p) <= 128000L) {
  442. /* 441 */ p.playSound(p.getLocation(), Sound.NOTE_BASS, 1.0F, 1.0F);
  443. /* 442 */ p.sendMessage(Main.pre + "§cDu besitzt nicht genuegend Shines.");
  444. /* 443 */ return;
  445. /* */ }
  446. /* 445 */ ShineManager.removeMoney(p, 128000L);
  447. /* 446 */ ScoreboardManager.updateScoreboard(p);
  448. /* 447 */ Util.addItem(p, new ItemCreator().material(item.getType()).amount(64).build());
  449. /* 448 */ p.playSound(p.getLocation(), Sound.NOTE_PLING, 1.0F, 1.0F);
  450. /* 449 */ p.sendMessage(Main.pre + "§7Du hast dir 64x §e" + item.getType() + "§7 gekauft.");
  451. /* 450 */ return;
  452. /* */ }
  453. /* 452 */ if (e.isLeftClick()) {
  454. /* 453 */ int free = 0;
  455. /* 454 */ for (ItemStack istack : p.getInventory()) {
  456. /* 455 */ if (istack == null) {
  457. /* 456 */ free++;
  458. /* */ }
  459. /* */ }
  460. /* 459 */ if (free == 0) {
  461. /* 460 */ p.sendMessage(Main.pre + "§cDu hast nicht genuegend Platz in deinem Inventar.");
  462. /* 461 */ return;
  463. /* */ }
  464. /* 463 */ if (ShineManager.getMoney(p) <= 2000L) {
  465. /* 464 */ p.playSound(p.getLocation(), Sound.NOTE_BASS, 1.0F, 1.0F);
  466. /* 465 */ p.sendMessage(Main.pre + "§cDu besitzt nicht genuegend Shines.");
  467. /* 466 */ return;
  468. /* */ }
  469. /* 468 */ ShineManager.removeMoney(p, 2000L);
  470. /* 469 */ ScoreboardManager.updateScoreboard(p);
  471. /* 470 */ Util.addItem(p, new ItemCreator().material(item.getType()).build());
  472. /* 471 */ p.playSound(p.getLocation(), Sound.NOTE_PLING, 1.0F, 1.0F);
  473. /* 472 */ p.sendMessage(Main.pre + "§7Du hast dir 1x §e" + item.getType() + "§7 gekauft.");
  474. /* 473 */ return;
  475. /* */ }
  476. /* */ }
  477. /* 476 */ if (item.getType() == Material.WOOD_DOOR) {
  478. /* 477 */ ShopInventoryWrapper.openItemShop(p);
  479. /* 478 */ } else if (item.getType() != Material.STAINED_GLASS_PANE) {
  480. /* 479 */ if (!inv.contains(item.getType())) {
  481. /* 480 */ e.setCancelled(true);
  482. /* 481 */ return;
  483. /* */ }
  484. /* 483 */ if ((e.isLeftClick()) && (e.isShiftClick())) {
  485. /* 484 */ int free = 0;
  486. /* 485 */ for (ItemStack istack : p.getInventory()) {
  487. /* 486 */ if (istack == null) {
  488. /* 487 */ free++;
  489. /* */ }
  490. /* */ }
  491. /* 490 */ if (free == 0) {
  492. /* 491 */ p.sendMessage(Main.pre + "§cDu hast nicht genuegend Platz in deinem Inventar.");
  493. /* 492 */ return;
  494. /* */ }
  495. /* 494 */ if (ShineManager.getMoney(p) <= 640L) {
  496. /* 495 */ p.playSound(p.getLocation(), Sound.NOTE_BASS, 1.0F, 1.0F);
  497. /* 496 */ p.sendMessage(Main.pre + "§cDu besitzt nicht genuegend Shines.");
  498. /* 497 */ return;
  499. /* */ }
  500. /* 499 */ ShineManager.removeMoney(p, 640L);
  501. /* 500 */ ScoreboardManager.updateScoreboard(p);
  502. /* 501 */ Util.addItem(p, new ItemCreator().material(item.getType()).amount(64).build());
  503. /* 502 */ p.playSound(p.getLocation(), Sound.NOTE_PLING, 1.0F, 1.0F);
  504. /* 503 */ p.sendMessage(Main.pre + "§7Du hast dir 64x §e" + item.getType() + "§7 gekauft.");
  505. /* 504 */ return;
  506. /* */ }
  507. /* 506 */ if (e.isLeftClick()) {
  508. /* 507 */ int free = 0;
  509. /* 508 */ for (ItemStack istack : p.getInventory()) {
  510. /* 509 */ if (istack == null) {
  511. /* 510 */ free++;
  512. /* */ }
  513. /* */ }
  514. /* 513 */ if (free == 0) {
  515. /* 514 */ p.sendMessage(Main.pre + "§cDu hast nicht genuegend Platz in deinem Inventar.");
  516. /* 515 */ return;
  517. /* */ }
  518. /* 517 */ if (ShineManager.getMoney(p) <= 10L) {
  519. /* 518 */ p.playSound(p.getLocation(), Sound.NOTE_BASS, 1.0F, 1.0F);
  520. /* 519 */ p.sendMessage(Main.pre + "§cDu besitzt nicht genuegend Shines.");
  521. /* 520 */ return;
  522. /* */ }
  523. /* 522 */ ShineManager.removeMoney(p, 10L);
  524. /* 523 */ ScoreboardManager.updateScoreboard(p);
  525. /* 524 */ Util.addItem(p, new ItemCreator().material(item.getType()).build());
  526. /* 525 */ p.playSound(p.getLocation(), Sound.NOTE_PLING, 1.0F, 1.0F);
  527. /* 526 */ p.sendMessage(Main.pre + "§7Du hast dir 1x §e" + item.getType() + "§7 gekauft."); return;
  528. /* */ }
  529. /* */ }
  530. /* */ }
  531. /* */ Object istack;
  532. /* 531 */ if (inv.getName().equalsIgnoreCase("§6§lItem-Erze-Shop")) {
  533. /* 532 */ e.setCancelled(true);
  534. /* 533 */ if (item.getType() == Material.DIAMOND) {
  535. /* 534 */ if ((e.isRightClick()) && (!e.isShiftClick())) {
  536. /* 535 */ if (!p.getInventory().contains(Material.DIAMOND)) {
  537. /* 536 */ p.sendMessage(Main.pre + "§cEs befindet sich kein " + item.getType() + " in deinem Inventar!");
  538. /* 537 */ p.playSound(p.getLocation().add(0.0D, 1.0D, 0.0D), Sound.NOTE_BASS, 1.0F, 1.0F);
  539. /* 538 */ return;
  540. /* */ }
  541. /* 540 */ int added = 0;
  542. /* 541 */ for (int i = 0; i < p.getInventory().getSize(); i++) {
  543. /* 542 */ ItemStack istack = p.getInventory().getItem(i);
  544. /* 543 */ if ((istack != null) &&
  545. /* 544 */ (istack.getType() == Material.DIAMOND)) {
  546. /* 545 */ int amount = istack.getAmount();
  547. /* 546 */ if (amount > 1) {
  548. /* 547 */ added++;
  549. /* 548 */ p.getInventory().setItem(i, new ItemStack(Material.DIAMOND, amount - 1));
  550. /* */ } else {
  551. /* 550 */ added++;
  552. /* 551 */ p.getInventory().setItem(i, new ItemStack(Material.AIR));
  553. /* */ }
  554. /* 553 */ ShineManager.addMoney(p, 250 * added);
  555. /* 554 */ ScoreboardManager.updateScoreboard(p);
  556. /* 555 */ p.sendMessage(Main.pre + "§7Du hast §e" + added + " §7Diamanten verkauft.");
  557. /* 556 */ p.playSound(p.getLocation().add(0.0D, 1.0D, 0.0D), Sound.DIG_STONE, 1.0F, 1.0F); return;
  558. /* */ }
  559. /* */ }
  560. /* */ }
  561. /* */
  562. /* */
  563. /* */ Object istack;
  564. /* */
  565. /* */
  566. /* 565 */ if ((e.isShiftClick()) && (e.isRightClick())) {
  567. /* 566 */ if (!p.getInventory().contains(Material.DIAMOND)) {
  568. /* 567 */ p.sendMessage(Main.pre + "§cEs befindet sich kein " + item.getType() + " in deinem Inventar!");
  569. /* 568 */ p.playSound(p.getLocation().add(0.0D, 1.0D, 0.0D), Sound.NOTE_BASS, 1.0F, 1.0F);
  570. /* 569 */ return;
  571. /* */ }
  572. /* 571 */ int added = 0;
  573. /* 572 */ for (int i = 0; i < p.getInventory().getSize(); i++) {
  574. /* 573 */ istack = p.getInventory().getItem(i);
  575. /* 574 */ if ((istack != null) &&
  576. /* 575 */ (((ItemStack)istack).getType() == Material.DIAMOND) &&
  577. /* 576 */ (((ItemStack)istack).getAmount() <= 64)) {
  578. /* 577 */ int amount = ((ItemStack)istack).getAmount();
  579. /* 578 */ added += amount;
  580. /* 579 */ ShineManager.addMoney(p, 250 * added);
  581. /* 580 */ ScoreboardManager.updateScoreboard(p);
  582. /* 581 */ p.getInventory().setItem(i, new ItemStack(Material.AIR));
  583. /* 582 */ p.sendMessage(Main.pre + "§7Du hast §e" + added +
  584. /* 583 */ " §7Diamanten verkauft.");
  585. /* 584 */ p.playSound(p.getLocation().add(0.0D, 1.0D, 0.0D), Sound.DIG_STONE, 1.0F, 1.0F);
  586. /* */
  587. /* 586 */ return;
  588. /* */ }
  589. /* */
  590. /* */
  591. /* 590 */ if ((istack == null) || (((ItemStack)istack).getAmount() <= 64)) {}
  592. /* */ }
  593. /* */ }
  594. /* */
  595. /* */
  596. /* 595 */ if ((e.isLeftClick()) && (e.isShiftClick())) {
  597. /* 596 */ int free = 0;
  598. /* 597 */ for (istack = p.getInventory().iterator(); ((Iterator)istack).hasNext();) { ItemStack istack = (ItemStack)((Iterator)istack).next();
  599. /* 598 */ if (istack == null) {
  600. /* 599 */ free++;
  601. /* */ }
  602. /* */ }
  603. /* 602 */ if (free == 0) {
  604. /* 603 */ p.sendMessage(Main.pre + "§cDu hast nicht genuegend Platz in deinem Inventar.");
  605. /* 604 */ return;
  606. /* */ }
  607. /* 606 */ if (ShineManager.getMoney(p) <= 32000L) {
  608. /* 607 */ p.playSound(p.getLocation(), Sound.NOTE_BASS, 1.0F, 1.0F);
  609. /* 608 */ p.sendMessage(Main.pre + "§cDu besitzt nicht genuegend Shines.");
  610. /* 609 */ return;
  611. /* */ }
  612. /* 611 */ ShineManager.removeMoney(p, 32000L);
  613. /* 612 */ ScoreboardManager.updateScoreboard(p);
  614. /* 613 */ Util.addItem(p, new ItemCreator().material(item.getType()).amount(64).build());
  615. /* 614 */ p.playSound(p.getLocation(), Sound.NOTE_PLING, 1.0F, 1.0F);
  616. /* 615 */ p.sendMessage(Main.pre + "§7Du hast dir 64x §e" + item.getType() + "§7 gekauft.");
  617. /* 616 */ return;
  618. /* */ }
  619. /* 618 */ if (e.isLeftClick()) {
  620. /* 619 */ int free = 0;
  621. /* 620 */ for (istack = p.getInventory().iterator(); ((Iterator)istack).hasNext();) { ItemStack istack = (ItemStack)((Iterator)istack).next();
  622. /* 621 */ if (istack == null) {
  623. /* 622 */ free++;
  624. /* */ }
  625. /* */ }
  626. /* 625 */ if (free == 0) {
  627. /* 626 */ p.sendMessage(Main.pre + "§cDu hast nicht genuegend Platz in deinem Inventar.");
  628. /* 627 */ return;
  629. /* */ }
  630. /* 629 */ if (ShineManager.getMoney(p) <= 500L) {
  631. /* 630 */ p.playSound(p.getLocation(), Sound.NOTE_BASS, 1.0F, 1.0F);
  632. /* 631 */ p.sendMessage(Main.pre + "§cDu besitzt nicht genuegend Shines.");
  633. /* 632 */ return;
  634. /* */ }
  635. /* 634 */ ShineManager.removeMoney(p, 500L);
  636. /* 635 */ ScoreboardManager.updateScoreboard(p);
  637. /* 636 */ Util.addItem(p, new ItemCreator().material(item.getType()).build());
  638. /* 637 */ p.playSound(p.getLocation(), Sound.NOTE_PLING, 1.0F, 1.0F);
  639. /* 638 */ p.sendMessage(Main.pre + "§7Du hast dir 1x §e" + item.getType() + "§7 gekauft."); return;
  640. /* */ }
  641. /* */ }
  642. /* */ Object istack;
  643. /* 642 */ if (item.getType() == Material.EMERALD) {
  644. /* 643 */ if ((e.isRightClick()) && (!e.isShiftClick())) {
  645. /* 644 */ if (!p.getInventory().contains(Material.EMERALD)) {
  646. /* 645 */ p.sendMessage(Main.pre + "§cEs befindet sich kein " + item.getType() + " in deinem Inventar!");
  647. /* 646 */ p.playSound(p.getLocation().add(0.0D, 1.0D, 0.0D), Sound.NOTE_BASS, 1.0F, 1.0F);
  648. /* 647 */ return;
  649. /* */ }
  650. /* 649 */ int added = 0;
  651. /* 650 */ for (int i = 0; i < p.getInventory().getSize(); i++) {
  652. /* 651 */ ItemStack istack = p.getInventory().getItem(i);
  653. /* 652 */ if ((istack != null) &&
  654. /* 653 */ (istack.getType() == Material.EMERALD)) {
  655. /* 654 */ int amount = istack.getAmount();
  656. /* 655 */ if (amount > 1) {
  657. /* 656 */ added++;
  658. /* 657 */ p.getInventory().setItem(i, new ItemStack(Material.EMERALD, amount - 1));
  659. /* */ } else {
  660. /* 659 */ added++;
  661. /* 660 */ p.getInventory().setItem(i, new ItemStack(Material.AIR));
  662. /* */ }
  663. /* 662 */ ShineManager.addMoney(p, 250 * added);
  664. /* 663 */ ScoreboardManager.updateScoreboard(p);
  665. /* 664 */ p.sendMessage(Main.pre + "§7Du hast §e" + added + " §7Emeralds verkauft.");
  666. /* 665 */ p.playSound(p.getLocation().add(0.0D, 1.0D, 0.0D), Sound.DIG_STONE, 1.0F, 1.0F);
  667. /* */
  668. /* 667 */ return;
  669. /* */ }
  670. /* */ }
  671. /* */ }
  672. /* */
  673. /* */
  674. /* */
  675. /* 674 */ if ((e.isShiftClick()) && (e.isRightClick())) {
  676. /* 675 */ if (!p.getInventory().contains(Material.EMERALD)) {
  677. /* 676 */ p.sendMessage(Main.pre + "§cEs befindet sich kein " + item.getType() + " in deinem Inventar!");
  678. /* 677 */ p.playSound(p.getLocation().add(0.0D, 1.0D, 0.0D), Sound.NOTE_BASS, 1.0F, 1.0F);
  679. /* 678 */ return;
  680. /* */ }
  681. /* 680 */ int added = 0;
  682. /* 681 */ for (int i = 0; i < p.getInventory().getSize(); i++) {
  683. /* 682 */ istack = p.getInventory().getItem(i);
  684. /* 683 */ if ((istack != null) &&
  685. /* 684 */ (((ItemStack)istack).getType() == Material.EMERALD) &&
  686. /* 685 */ (((ItemStack)istack).getAmount() <= 64)) {
  687. /* 686 */ int amount = ((ItemStack)istack).getAmount();
  688. /* 687 */ added += amount;
  689. /* 688 */ ShineManager.addMoney(p, 250 * added);
  690. /* 689 */ ScoreboardManager.updateScoreboard(p);
  691. /* 690 */ p.getInventory().setItem(i, new ItemStack(Material.AIR));
  692. /* 691 */ p.sendMessage(Main.pre + "§7Du hast §e" + added +
  693. /* 692 */ " §7Emeralds verkauft.");
  694. /* 693 */ p.playSound(p.getLocation().add(0.0D, 1.0D, 0.0D), Sound.DIG_STONE, 1.0F, 1.0F);
  695. /* */
  696. /* 695 */ return;
  697. /* */ }
  698. /* */
  699. /* */
  700. /* 699 */ if ((istack == null) || (((ItemStack)istack).getAmount() <= 64)) {}
  701. /* */ }
  702. /* */ }
  703. /* */
  704. /* */
  705. /* 704 */ if ((e.isLeftClick()) && (e.isShiftClick())) {
  706. /* 705 */ int free = 0;
  707. /* 706 */ for (istack = p.getInventory().iterator(); ((Iterator)istack).hasNext();) { ItemStack istack = (ItemStack)((Iterator)istack).next();
  708. /* 707 */ if (istack == null) {
  709. /* 708 */ free++;
  710. /* */ }
  711. /* */ }
  712. /* 711 */ if (free == 0) {
  713. /* 712 */ p.sendMessage(Main.pre + "§cDu hast nicht genuegend Platz in deinem Inventar.");
  714. /* 713 */ return;
  715. /* */ }
  716. /* 715 */ if (ShineManager.getMoney(p) <= 32000L) {
  717. /* 716 */ p.playSound(p.getLocation(), Sound.NOTE_BASS, 1.0F, 1.0F);
  718. /* 717 */ p.sendMessage(Main.pre + "§cDu besitzt nicht genuegend Shines.");
  719. /* 718 */ return;
  720. /* */ }
  721. /* 720 */ ShineManager.removeMoney(p, 32000L);
  722. /* 721 */ ScoreboardManager.updateScoreboard(p);
  723. /* 722 */ Util.addItem(p, new ItemCreator().material(item.getType()).amount(64).build());
  724. /* 723 */ p.playSound(p.getLocation(), Sound.NOTE_PLING, 1.0F, 1.0F);
  725. /* 724 */ p.sendMessage(Main.pre + "§7Du hast dir 64x §e" + item.getType() + "§7 gekauft.");
  726. /* 725 */ return;
  727. /* */ }
  728. /* 727 */ if (e.isLeftClick()) {
  729. /* 728 */ int free = 0;
  730. /* 729 */ for (istack = p.getInventory().iterator(); ((Iterator)istack).hasNext();) { ItemStack istack = (ItemStack)((Iterator)istack).next();
  731. /* 730 */ if (istack == null) {
  732. /* 731 */ free++;
  733. /* */ }
  734. /* */ }
  735. /* 734 */ if (free == 0) {
  736. /* 735 */ p.sendMessage(Main.pre + "§cDu hast nicht genuegend Platz in deinem Inventar.");
  737. /* 736 */ return;
  738. /* */ }
  739. /* 738 */ if (ShineManager.getMoney(p) <= 500L) {
  740. /* 739 */ p.playSound(p.getLocation(), Sound.NOTE_BASS, 1.0F, 1.0F);
  741. /* 740 */ p.sendMessage(Main.pre + "§cDu besitzt nicht genuegend Shines.");
  742. /* 741 */ return;
  743. /* */ }
  744. /* 743 */ ShineManager.removeMoney(p, 500L);
  745. /* 744 */ ScoreboardManager.updateScoreboard(p);
  746. /* 745 */ Util.addItem(p, new ItemCreator().material(item.getType()).build());
  747. /* 746 */ p.playSound(p.getLocation(), Sound.NOTE_PLING, 1.0F, 1.0F);
  748. /* 747 */ p.sendMessage(Main.pre + "§7Du hast dir 1x §e" + item.getType() + "§7 gekauft.");
  749. /* 748 */ return;
  750. /* */ }
  751. /* */ }
  752. /* 751 */ if ((item.getType() == Material.INK_SACK) && (item.hasItemMeta()) && (item.getItemMeta().hasDisplayName()) &&
  753. /* 752 */ (item.getItemMeta().getDisplayName().startsWith("§7Lapis §8§o<Klick>"))) {
  754. /* 753 */ if ((e.isLeftClick()) && (e.isShiftClick())) {
  755. /* 754 */ int free = 0;
  756. /* 755 */ for (istack = p.getInventory().iterator(); ((Iterator)istack).hasNext();) { ItemStack istack = (ItemStack)((Iterator)istack).next();
  757. /* 756 */ if (istack == null) {
  758. /* 757 */ free++;
  759. /* */ }
  760. /* */ }
  761. /* 760 */ if (free == 0) {
  762. /* 761 */ p.sendMessage(Main.pre + "§cDu hast nicht genuegend Platz in deinem Inventar.");
  763. /* 762 */ return;
  764. /* */ }
  765. /* 764 */ if (ShineManager.getMoney(p) <= 16000L) {
  766. /* 765 */ p.playSound(p.getLocation(), Sound.NOTE_BASS, 1.0F, 1.0F);
  767. /* 766 */ p.sendMessage(Main.pre + "§cDu besitzt nicht genuegend Shines.");
  768. /* 767 */ return;
  769. /* */ }
  770. /* 769 */ ShineManager.removeMoney(p, 16000L);
  771. /* 770 */ ScoreboardManager.updateScoreboard(p);
  772. /* 771 */ Util.addItem(p, new ItemCreator().material(item.getType()).data((short)4).amount(64).build());
  773. /* 772 */ p.playSound(p.getLocation(), Sound.NOTE_PLING, 1.0F, 1.0F);
  774. /* 773 */ p.sendMessage(Main.pre + "§7Du hast dir 64x §e" + item.getType() + "§7 gekauft.");
  775. /* 774 */ return;
  776. /* */ }
  777. /* 776 */ if (e.isLeftClick()) {
  778. /* 777 */ int free = 0;
  779. /* 778 */ for (istack = p.getInventory().iterator(); ((Iterator)istack).hasNext();) { ItemStack istack = (ItemStack)((Iterator)istack).next();
  780. /* 779 */ if (istack == null) {
  781. /* 780 */ free++;
  782. /* */ }
  783. /* */ }
  784. /* 783 */ if (free == 0) {
  785. /* 784 */ p.sendMessage(Main.pre + "§cDu hast nicht genuegend Platz in deinem Inventar.");
  786. /* 785 */ return;
  787. /* */ }
  788. /* 787 */ if (ShineManager.getMoney(p) <= 250L) {
  789. /* 788 */ p.playSound(p.getLocation(), Sound.NOTE_BASS, 1.0F, 1.0F);
  790. /* 789 */ p.sendMessage(Main.pre + "§cDu besitzt nicht genuegend Shines.");
  791. /* 790 */ return;
  792. /* */ }
  793. /* 792 */ ShineManager.removeMoney(p, 250L);
  794. /* 793 */ ScoreboardManager.updateScoreboard(p);
  795. /* 794 */ Util.addItem(p, new ItemCreator().material(item.getType()).data((short)4).build());
  796. /* 795 */ p.playSound(p.getLocation(), Sound.NOTE_PLING, 1.0F, 1.0F);
  797. /* 796 */ p.sendMessage(Main.pre + "§7Du hast dir 1x §e" + item.getType() + "§7 gekauft.");
  798. /* 797 */ return;
  799. /* */ }
  800. /* */ }
  801. /* 800 */ if (item.getType() == Material.WOOD_DOOR) {
  802. /* 801 */ ShopInventoryWrapper.openItemShop(p);
  803. /* 802 */ } else if (item.getType() != Material.STAINED_GLASS_PANE) {
  804. /* 803 */ if (!inv.contains(item.getType())) {
  805. /* 804 */ e.setCancelled(true);
  806. /* 805 */ return;
  807. /* */ }
  808. /* 807 */ if ((item.getType() == Material.INK_SACK) && (
  809. /* 808 */ (item.getType() != Material.INK_SACK) || (!item.hasItemMeta()) ||
  810. /* 809 */ (!item.getItemMeta().hasDisplayName()) ||
  811. /* 810 */ (!item.getItemMeta().getDisplayName().startsWith("§7Lapis §8§o<Klick>")))) {
  812. /* 811 */ return;
  813. /* */ }
  814. /* */
  815. /* 814 */ if ((e.isRightClick()) && (!e.isShiftClick())) {
  816. /* 815 */ if (!p.getInventory().contains(item.getType())) {
  817. /* 816 */ p.sendMessage(Main.pre + "§cEs befindet sich kein " + item.getType() + " in deinem Inventar!");
  818. /* 817 */ p.playSound(p.getLocation().add(0.0D, 1.0D, 0.0D), Sound.NOTE_BASS, 1.0F, 1.0F);
  819. /* 818 */ return;
  820. /* */ }
  821. /* 820 */ int added = 0;
  822. /* 821 */ for (int i = 0; i < p.getInventory().getSize(); i++) {
  823. /* 822 */ ItemStack istack = p.getInventory().getItem(i);
  824. /* 823 */ if ((istack != null) &&
  825. /* 824 */ (istack.getType() == item.getType())) {
  826. /* 825 */ int amount = istack.getAmount();
  827. /* 826 */ if (amount > 1) {
  828. /* 827 */ added++;
  829. /* 828 */ p.getInventory().setItem(i, new ItemStack(item.getType(), amount - 1));
  830. /* */ } else {
  831. /* 830 */ added++;
  832. /* 831 */ p.getInventory().setItem(i, new ItemStack(Material.AIR));
  833. /* */ }
  834. /* 833 */ ShineManager.addMoney(p, 125 * added);
  835. /* 834 */ ScoreboardManager.updateScoreboard(p);
  836. /* 835 */ p.sendMessage(Main.pre + "§7Du hast §e" + added + " §7" + item.getType() + " verkauft.");
  837. /* 836 */ p.playSound(p.getLocation().add(0.0D, 1.0D, 0.0D), Sound.DIG_STONE, 1.0F, 1.0F);
  838. /* */
  839. /* 838 */ return;
  840. /* */ }
  841. /* */ }
  842. /* */ }
  843. /* */
  844. /* */
  845. /* */
  846. /* 845 */ if ((e.isShiftClick()) && (e.isRightClick())) {
  847. /* 846 */ if (!p.getInventory().contains(item.getType())) {
  848. /* 847 */ p.sendMessage(Main.pre + "§cEs befindet sich kein " + item.getType() + " in deinem Inventar!");
  849. /* 848 */ p.playSound(p.getLocation().add(0.0D, 1.0D, 0.0D), Sound.NOTE_BASS, 1.0F, 1.0F);
  850. /* 849 */ return;
  851. /* */ }
  852. /* 851 */ int added = 0;
  853. /* 852 */ for (int i = 0; i < p.getInventory().getSize(); i++) {
  854. /* 853 */ istack = p.getInventory().getItem(i);
  855. /* 854 */ if ((istack != null) &&
  856. /* 855 */ (((ItemStack)istack).getType() == item.getType()) &&
  857. /* 856 */ (((ItemStack)istack).getAmount() <= 64)) {
  858. /* 857 */ int amount = ((ItemStack)istack).getAmount();
  859. /* 858 */ added += amount;
  860. /* 859 */ ShineManager.addMoney(p, 125 * added);
  861. /* 860 */ ScoreboardManager.updateScoreboard(p);
  862. /* 861 */ p.getInventory().setItem(i, new ItemStack(Material.AIR));
  863. /* 862 */ p.sendMessage(Main.pre + "§7Du hast §e" + added +
  864. /* 863 */ " §7" + item.getType() + " verkauft.");
  865. /* 864 */ p.playSound(p.getLocation().add(0.0D, 1.0D, 0.0D), Sound.DIG_STONE, 1.0F, 1.0F);
  866. /* */
  867. /* 866 */ return;
  868. /* */ }
  869. /* */
  870. /* */
  871. /* 870 */ if ((istack == null) || (((ItemStack)istack).getAmount() <= 64)) {}
  872. /* */ }
  873. /* */ }
  874. /* */
  875. /* */
  876. /* 875 */ if ((e.isLeftClick()) && (e.isShiftClick())) {
  877. /* 876 */ int free = 0;
  878. /* 877 */ for (istack = p.getInventory().iterator(); ((Iterator)istack).hasNext();) { ItemStack istack = (ItemStack)((Iterator)istack).next();
  879. /* 878 */ if (istack == null) {
  880. /* 879 */ free++;
  881. /* */ }
  882. /* */ }
  883. /* 882 */ if (free == 0) {
  884. /* 883 */ p.sendMessage(Main.pre + "§cDu hast nicht genuegend Platz in deinem Inventar.");
  885. /* 884 */ return;
  886. /* */ }
  887. /* 886 */ if (ShineManager.getMoney(p) <= 16000L) {
  888. /* 887 */ p.playSound(p.getLocation(), Sound.NOTE_BASS, 1.0F, 1.0F);
  889. /* 888 */ p.sendMessage(Main.pre + "§cDu besitzt nicht genuegend Shines.");
  890. /* 889 */ return;
  891. /* */ }
  892. /* 891 */ ShineManager.removeMoney(p, 16000L);
  893. /* 892 */ ScoreboardManager.updateScoreboard(p);
  894. /* 893 */ Util.addItem(p, new ItemCreator().material(item.getType()).amount(64).build());
  895. /* 894 */ p.playSound(p.getLocation(), Sound.NOTE_PLING, 1.0F, 1.0F);
  896. /* 895 */ p.sendMessage(Main.pre + "§7Du hast dir 64x §e" + item.getType() + "§7 gekauft.");
  897. /* 896 */ return;
  898. /* */ }
  899. /* 898 */ if (e.isLeftClick()) {
  900. /* 899 */ int free = 0;
  901. /* 900 */ for (istack = p.getInventory().iterator(); ((Iterator)istack).hasNext();) { ItemStack istack = (ItemStack)((Iterator)istack).next();
  902. /* 901 */ if (istack == null) {
  903. /* 902 */ free++;
  904. /* */ }
  905. /* */ }
  906. /* 905 */ if (free == 0) {
  907. /* 906 */ p.sendMessage(Main.pre + "§cDu hast nicht genuegend Platz in deinem Inventar.");
  908. /* 907 */ return;
  909. /* */ }
  910. /* 909 */ if (ShineManager.getMoney(p) <= 250L) {
  911. /* 910 */ p.playSound(p.getLocation(), Sound.NOTE_BASS, 1.0F, 1.0F);
  912. /* 911 */ p.sendMessage(Main.pre + "§cDu besitzt nicht genuegend Shines.");
  913. /* 912 */ return;
  914. /* */ }
  915. /* 914 */ ShineManager.removeMoney(p, 250L);
  916. /* 915 */ ScoreboardManager.updateScoreboard(p);
  917. /* 916 */ Util.addItem(p, new ItemCreator().material(item.getType()).build());
  918. /* 917 */ p.playSound(p.getLocation(), Sound.NOTE_PLING, 1.0F, 1.0F);
  919. /* 918 */ p.sendMessage(Main.pre + "§7Du hast dir 1x §e" + item.getType() + "§7 gekauft.");
  920. /* 919 */ return;
  921. /* */ }
  922. /* */ }
  923. /* */ }
  924. /* */
  925. /* */
  926. /* 925 */ if (inv.getName().equalsIgnoreCase("§6§lKit-Shop")) {
  927. /* 926 */ e.setCancelled(true);
  928. /* 927 */ if (item.getType() == Material.WOOD_SWORD) {
  929. /* 928 */ int free = 0;
  930. /* 929 */ for (istack = p.getInventory().iterator(); ((Iterator)istack).hasNext();) { ItemStack istack = (ItemStack)((Iterator)istack).next();
  931. /* 930 */ if (istack == null) {
  932. /* 931 */ free++;
  933. /* */ }
  934. /* */ }
  935. /* 934 */ if (free < 18) {
  936. /* 935 */ p.sendMessage(Main.pre + "§cDu hast nicht genuegend Platz in deinem Inventar.");
  937. /* 936 */ return;
  938. /* */ }
  939. /* 938 */ if (ShineManager.getMoney(p) <= 50000L) {
  940. /* 939 */ p.playSound(p.getLocation(), Sound.NOTE_BASS, 1.0F, 1.0F);
  941. /* 940 */ p.sendMessage(Main.pre + "§cDu besitzt nicht genuegend Shines.");
  942. /* 941 */ return;
  943. /* */ }
  944. /* 943 */ ShineManager.removeMoney(p, 50000L);
  945. /* 944 */ ScoreboardManager.updateScoreboard(p);
  946. /* 945 */ p.playSound(p.getLocation(), Sound.NOTE_PLING, 1.0F, 1.0F);
  947. /* 946 */ Util.addItem(p,
  948. /* 947 */ new ItemCreator().material(Material.DIAMOND_HELMET)
  949. /* 948 */ .addEnchant(Enchantment.PROTECTION_ENVIRONMENTAL, 3)
  950. /* 949 */ .displayName("§6§lPvPShine §8| §7§lSchutz III").build());
  951. /* 950 */ Util.addItem(p,
  952. /* 951 */ new ItemCreator().material(Material.DIAMOND_CHESTPLATE)
  953. /* 952 */ .addEnchant(Enchantment.PROTECTION_ENVIRONMENTAL, 3)
  954. /* 953 */ .displayName("§6§lPvPShine §8| §7§lSchutz III").build());
  955. /* 954 */ Util.addItem(p,
  956. /* 955 */ new ItemCreator().material(Material.DIAMOND_LEGGINGS)
  957. /* 956 */ .addEnchant(Enchantment.PROTECTION_ENVIRONMENTAL, 3)
  958. /* 957 */ .displayName("§6§lPvPShine §8| §7§lSchutz III").build());
  959. /* 958 */ Util.addItem(p,
  960. /* 959 */ new ItemCreator().material(Material.DIAMOND_BOOTS)
  961. /* 960 */ .addEnchant(Enchantment.PROTECTION_ENVIRONMENTAL, 3)
  962. /* 961 */ .displayName("§6§lPvPShine §8| §7§lSchutz III").build());
  963. /* 962 */ Util.addItem(p,
  964. /* 963 */ new ItemCreator().material(Material.DIAMOND_SWORD).addEnchant(Enchantment.DAMAGE_ALL, 3)
  965. /* 964 */ .addEnchant(Enchantment.FIRE_ASPECT, 1).displayName("§6§lPvPShine §8| §7§lSchärfe III")
  966. /* 965 */ .build());
  967. /* 966 */ Util.addItem(p, new ItemCreator().material(Material.COOKED_BEEF).amount(64).build());
  968. /* 967 */ Util.addItem(p, new ItemCreator().material(Material.POTION).data((short)16421).amount(64).build());
  969. /* 968 */ Util.addItem(p, new ItemCreator().material(Material.POTION).data((short)16421).amount(64).build());
  970. /* 969 */ Util.addItem(p, new ItemCreator().material(Material.POTION).data((short)16421).amount(64).build());
  971. /* 970 */ Util.addItem(p, new ItemCreator().material(Material.POTION).data((short)16421).amount(64).build());
  972. /* 971 */ Util.addItem(p, new ItemCreator().material(Material.POTION).data((short)16421).amount(64).build());
  973. /* 972 */ Util.addItem(p, new ItemCreator().material(Material.POTION).data((short)16421).amount(64).build());
  974. /* 973 */ Util.addItem(p, new ItemCreator().material(Material.POTION).data((short)16421).amount(64).build());
  975. /* 974 */ Util.addItem(p, new ItemCreator().material(Material.POTION).data((short)16421).amount(64).build());
  976. /* 975 */ Util.addItem(p, new ItemCreator().material(Material.POTION).data((short)16417).amount(64).build());
  977. /* 976 */ Util.addItem(p, new ItemCreator().material(Material.POTION).data((short)16393).amount(64).build());
  978. /* 977 */ Util.addItem(p, new ItemCreator().material(Material.POTION).data((short)16418).amount(64).build());
  979. /* 978 */ Util.addItem(p, new ItemCreator().material(Material.POTION).data((short)16451).amount(64).build());
  980. /* 979 */ p.sendMessage(Main.pre + "§7Du hast das §9Member §7Kit gekauft.");
  981. /* 980 */ p.playSound(p.getLocation(), Sound.NOTE_PLING, 1.0F, 1.0F);
  982. /* */ }
  983. /* 982 */ if (item.getType() == Material.STONE_SWORD) {
  984. /* 983 */ int free = 0;
  985. /* 984 */ for (istack = p.getInventory().iterator(); ((Iterator)istack).hasNext();) { ItemStack istack = (ItemStack)((Iterator)istack).next();
  986. /* 985 */ if (istack == null) {
  987. /* 986 */ free++;
  988. /* */ }
  989. /* */ }
  990. /* 989 */ if (free < 18) {
  991. /* 990 */ p.sendMessage(Main.pre + "§cDu hast nicht genuegend Platz in deinem Inventar.");
  992. /* 991 */ return;
  993. /* */ }
  994. /* 993 */ if (ShineManager.getMoney(p) <= 130000L) {
  995. /* 994 */ p.playSound(p.getLocation(), Sound.NOTE_BASS, 1.0F, 1.0F);
  996. /* 995 */ p.sendMessage(Main.pre + "§cDu besitzt nicht genuegend Shines.");
  997. /* 996 */ return;
  998. /* */ }
  999. /* 998 */ ShineManager.removeMoney(p, 130000L);
  1000. /* 999 */ ScoreboardManager.updateScoreboard(p);
  1001. /* 1000 */ Util.addItem(p,
  1002. /* 1001 */ new ItemCreator().material(Material.DIAMOND_HELMET)
  1003. /* 1002 */ .addEnchant(Enchantment.PROTECTION_ENVIRONMENTAL, 4)
  1004. /* 1003 */ .displayName("§6§lPvPShine §8| §7§lSchutz IV").build());
  1005. /* 1004 */ Util.addItem(p,
  1006. /* 1005 */ new ItemCreator().material(Material.DIAMOND_CHESTPLATE)
  1007. /* 1006 */ .addEnchant(Enchantment.PROTECTION_ENVIRONMENTAL, 3)
  1008. /* 1007 */ .displayName("§6§lPvPShine §8| §7§lSchutz III").build());
  1009. /* 1008 */ Util.addItem(p,
  1010. /* 1009 */ new ItemCreator().material(Material.DIAMOND_LEGGINGS)
  1011. /* 1010 */ .addEnchant(Enchantment.PROTECTION_ENVIRONMENTAL, 3)
  1012. /* 1011 */ .displayName("§6§lPvPShine §8| §7§lSchutz III").build());
  1013. /* 1012 */ Util.addItem(p,
  1014. /* 1013 */ new ItemCreator().material(Material.DIAMOND_BOOTS)
  1015. /* 1014 */ .addEnchant(Enchantment.PROTECTION_ENVIRONMENTAL, 4)
  1016. /* 1015 */ .displayName("§6§lPvPShine §8| §7§lSchutz IV").build());
  1017. /* 1016 */ Util.addItem(p, new ItemCreator().material(Material.DIAMOND_SWORD).addEnchant(Enchantment.DAMAGE_ALL, 4)
  1018. /* 1017 */ .addEnchant(Enchantment.FIRE_ASPECT, 1).displayName("§6§lPvPShine §8| §7§lSchärfe IV").build());
  1019. /* 1018 */ Util.addItem(p, new ItemCreator().material(Material.COOKED_BEEF).amount(64).build());
  1020. /* 1019 */ Util.addItem(p, new ItemCreator().material(Material.POTION).data((short)16421).amount(64).build());
  1021. /* 1020 */ Util.addItem(p, new ItemCreator().material(Material.POTION).data((short)16421).amount(64).build());
  1022. /* 1021 */ Util.addItem(p, new ItemCreator().material(Material.POTION).data((short)16421).amount(64).build());
  1023. /* 1022 */ Util.addItem(p, new ItemCreator().material(Material.POTION).data((short)16421).amount(64).build());
  1024. /* 1023 */ Util.addItem(p, new ItemCreator().material(Material.POTION).data((short)16421).amount(64).build());
  1025. /* 1024 */ Util.addItem(p, new ItemCreator().material(Material.POTION).data((short)16421).amount(64).build());
  1026. /* 1025 */ Util.addItem(p, new ItemCreator().material(Material.POTION).data((short)16421).amount(64).build());
  1027. /* 1026 */ Util.addItem(p, new ItemCreator().material(Material.POTION).data((short)16421).amount(64).build());
  1028. /* 1027 */ Util.addItem(p, new ItemCreator().material(Material.POTION).data((short)16417).amount(64).build());
  1029. /* 1028 */ Util.addItem(p, new ItemCreator().material(Material.POTION).data((short)16425).amount(64).build());
  1030. /* 1029 */ Util.addItem(p, new ItemCreator().material(Material.POTION).data((short)16418).amount(64).build());
  1031. /* 1030 */ Util.addItem(p, new ItemCreator().material(Material.POTION).data((short)16451).amount(64).build());
  1032. /* 1031 */ p.sendMessage(Main.pre + "§7Du hast das §8Titanium §7Kit gekauft.");
  1033. /* 1032 */ p.playSound(p.getLocation(), Sound.NOTE_PLING, 1.0F, 1.0F);
  1034. /* */ }
  1035. /* 1034 */ if (item.getType() == Material.IRON_SWORD) {
  1036. /* 1035 */ int free = 0;
  1037. /* 1036 */ for (istack = p.getInventory().iterator(); ((Iterator)istack).hasNext();) { ItemStack istack = (ItemStack)((Iterator)istack).next();
  1038. /* 1037 */ if (istack == null) {
  1039. /* 1038 */ free++;
  1040. /* */ }
  1041. /* */ }
  1042. /* 1041 */ if (free < 18) {
  1043. /* 1042 */ p.sendMessage(Main.pre + "§cDu hast nicht genuegend Platz in deinem Inventar.");
  1044. /* 1043 */ return;
  1045. /* */ }
  1046. /* 1045 */ if (ShineManager.getMoney(p) <= 170000L) {
  1047. /* 1046 */ p.playSound(p.getLocation(), Sound.NOTE_BASS, 1.0F, 1.0F);
  1048. /* 1047 */ p.sendMessage(Main.pre + "§cDu besitzt nicht genuegend Shines.");
  1049. /* 1048 */ return;
  1050. /* */ }
  1051. /* 1050 */ ShineManager.removeMoney(p, 170000L);
  1052. /* 1051 */ ScoreboardManager.updateScoreboard(p);
  1053. /* 1052 */ Util.addItem(p,
  1054. /* 1053 */ new ItemCreator().material(Material.DIAMOND_HELMET)
  1055. /* 1054 */ .addEnchant(Enchantment.PROTECTION_ENVIRONMENTAL, 4)
  1056. /* 1055 */ .displayName("§6§lPvPShine §8| §7§lSchutz IV").build());
  1057. /* 1056 */ Util.addItem(p,
  1058. /* 1057 */ new ItemCreator().material(Material.DIAMOND_CHESTPLATE)
  1059. /* 1058 */ .addEnchant(Enchantment.PROTECTION_ENVIRONMENTAL, 4)
  1060. /* 1059 */ .displayName("§6§lPvPShine §8| §7§lSchutz IV").build());
  1061. /* 1060 */ Util.addItem(p,
  1062. /* 1061 */ new ItemCreator().material(Material.DIAMOND_LEGGINGS)
  1063. /* 1062 */ .addEnchant(Enchantment.PROTECTION_ENVIRONMENTAL, 4)
  1064. /* 1063 */ .displayName("§6§lPvPShine §8| §7§lSchutz IV").build());
  1065. /* 1064 */ Util.addItem(p,
  1066. /* 1065 */ new ItemCreator().material(Material.DIAMOND_BOOTS)
  1067. /* 1066 */ .addEnchant(Enchantment.PROTECTION_ENVIRONMENTAL, 4)
  1068. /* 1067 */ .displayName("§6§lPvPShine §8| §7§lSchutz IV").build());
  1069. /* 1068 */ Util.addItem(p, new ItemCreator().material(Material.DIAMOND_SWORD).addEnchant(Enchantment.DAMAGE_ALL, 4)
  1070. /* 1069 */ .addEnchant(Enchantment.FIRE_ASPECT, 1).displayName("§6§lPvPShine §8| §7§lSchärfe IV").build());
  1071. /* 1070 */ Util.addItem(p, new ItemCreator().material(Material.COOKED_BEEF).amount(64).build());
  1072. /* 1071 */ Util.addItem(p, new ItemCreator().material(Material.POTION).data((short)16421).amount(64).build());
  1073. /* 1072 */ Util.addItem(p, new ItemCreator().material(Material.POTION).data((short)16421).amount(64).build());
  1074. /* 1073 */ Util.addItem(p, new ItemCreator().material(Material.POTION).data((short)16421).amount(64).build());
  1075. /* 1074 */ Util.addItem(p, new ItemCreator().material(Material.POTION).data((short)16421).amount(64).build());
  1076. /* 1075 */ Util.addItem(p, new ItemCreator().material(Material.POTION).data((short)16421).amount(64).build());
  1077. /* 1076 */ Util.addItem(p, new ItemCreator().material(Material.POTION).data((short)16421).amount(64).build());
  1078. /* 1077 */ Util.addItem(p, new ItemCreator().material(Material.POTION).data((short)16421).amount(64).build());
  1079. /* 1078 */ Util.addItem(p, new ItemCreator().material(Material.POTION).data((short)16421).amount(64).build());
  1080. /* 1079 */ Util.addItem(p, new ItemCreator().material(Material.POTION).data((short)16417).amount(64).build());
  1081. /* 1080 */ Util.addItem(p, new ItemCreator().material(Material.POTION).data((short)16425).amount(64).build());
  1082. /* 1081 */ Util.addItem(p, new ItemCreator().material(Material.POTION).data((short)16418).amount(64).build());
  1083. /* 1082 */ Util.addItem(p, new ItemCreator().material(Material.POTION).data((short)16451).amount(64).build());
  1084. /* 1083 */ p.sendMessage(Main.pre + "§7Du hast das §6Legend §7Kit gekauft.");
  1085. /* 1084 */ p.playSound(p.getLocation(), Sound.NOTE_PLING, 1.0F, 1.0F);
  1086. /* */ }
  1087. /* 1086 */ if (item.getType() == Material.DIAMOND_SWORD) {
  1088. /* 1087 */ int free = 0;
  1089. /* 1088 */ for (istack = p.getInventory().iterator(); ((Iterator)istack).hasNext();) { ItemStack istack = (ItemStack)((Iterator)istack).next();
  1090. /* 1089 */ if (istack == null) {
  1091. /* 1090 */ free++;
  1092. /* */ }
  1093. /* */ }
  1094. /* 1093 */ if (free < 18) {
  1095. /* 1094 */ p.sendMessage(Main.pre + "§cDu hast nicht genuegend Platz in deinem Inventar.");
  1096. /* 1095 */ return;
  1097. /* */ }
  1098. /* 1097 */ if (ShineManager.getMoney(p) <= 250000L) {
  1099. /* 1098 */ p.playSound(p.getLocation(), Sound.NOTE_BASS, 1.0F, 1.0F);
  1100. /* 1099 */ p.sendMessage(Main.pre + "§cDu besitzt nicht genuegend Shines.");
  1101. /* 1100 */ return;
  1102. /* */ }
  1103. /* 1102 */ ShineManager.removeMoney(p, 250000L);
  1104. /* 1103 */ ScoreboardManager.updateScoreboard(p);
  1105. /* 1104 */ Util.addItem(p,
  1106. /* 1105 */ new ItemCreator().material(Material.DIAMOND_HELMET)
  1107. /* 1106 */ .addEnchant(Enchantment.PROTECTION_ENVIRONMENTAL, 4)
  1108. /* 1107 */ .displayName("§6§lPvPShine §8| §7§lSchutz IV").build());
  1109. /* 1108 */ Util.addItem(p,
  1110. /* 1109 */ new ItemCreator().material(Material.DIAMOND_CHESTPLATE)
  1111. /* 1110 */ .addEnchant(Enchantment.PROTECTION_ENVIRONMENTAL, 4)
  1112. /* 1111 */ .displayName("§6§lPvPShine §8| §7§lSchutz IV").build());
  1113. /* 1112 */ Util.addItem(p,
  1114. /* 1113 */ new ItemCreator().material(Material.DIAMOND_LEGGINGS)
  1115. /* 1114 */ .addEnchant(Enchantment.PROTECTION_ENVIRONMENTAL, 4)
  1116. /* 1115 */ .displayName("§6§lPvPShine §8| §7§lSchutz IV").build());
  1117. /* 1116 */ Util.addItem(p,
  1118. /* 1117 */ new ItemCreator().material(Material.DIAMOND_BOOTS)
  1119. /* 1118 */ .addEnchant(Enchantment.PROTECTION_ENVIRONMENTAL, 4)
  1120. /* 1119 */ .displayName("§6§lPvPShine §8| §7§lSchutz IV").build());
  1121. /* 1120 */ Util.addItem(p, new ItemCreator().material(Material.DIAMOND_SWORD).addEnchant(Enchantment.DAMAGE_ALL, 5)
  1122. /* 1121 */ .addEnchant(Enchantment.FIRE_ASPECT, 1).displayName("§6§lPvPShine §8| §7§lSchärfe V").build());
  1123. /* 1122 */ Util.addItem(p, new ItemCreator().material(Material.COOKED_BEEF).amount(64).build());
  1124. /* 1123 */ Util.addItem(p, new ItemCreator().material(Material.POTION).data((short)16421).amount(64).build());
  1125. /* 1124 */ Util.addItem(p, new ItemCreator().material(Material.POTION).data((short)16421).amount(64).build());
  1126. /* 1125 */ Util.addItem(p, new ItemCreator().material(Material.POTION).data((short)16421).amount(64).build());
  1127. /* 1126 */ Util.addItem(p, new ItemCreator().material(Material.POTION).data((short)16421).amount(64).build());
  1128. /* 1127 */ Util.addItem(p, new ItemCreator().material(Material.POTION).data((short)16421).amount(64).build());
  1129. /* 1128 */ Util.addItem(p, new ItemCreator().material(Material.POTION).data((short)16421).amount(64).build());
  1130. /* 1129 */ Util.addItem(p, new ItemCreator().material(Material.POTION).data((short)16421).amount(64).build());
  1131. /* 1130 */ Util.addItem(p, new ItemCreator().material(Material.POTION).data((short)16421).amount(64).build());
  1132. /* 1131 */ Util.addItem(p, new ItemCreator().material(Material.POTION).data((short)16417).amount(64).build());
  1133. /* 1132 */ Util.addItem(p, new ItemCreator().material(Material.POTION).data((short)16425).amount(64).build());
  1134. /* 1133 */ Util.addItem(p, new ItemCreator().material(Material.POTION).data((short)16418).amount(64).build());
  1135. /* 1134 */ Util.addItem(p, new ItemCreator().material(Material.POTION).data((short)16451).amount(64).build());
  1136. /* 1135 */ p.sendMessage(Main.pre + "§7Du hast das §3Platin §7Kit gekauft.");
  1137. /* 1136 */ p.playSound(p.getLocation(), Sound.NOTE_PLING, 1.0F, 1.0F);
  1138. /* */ }
  1139. /* 1138 */ if (item.getType() == Material.WOOD_DOOR) {
  1140. /* 1139 */ ShopInventoryWrapper.openMainShop(p);
  1141. /* */ }
  1142. /* */ }
  1143. /* */ }
  1144. /* */ }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement