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