Ever 20 Opublikowano 12 lutego 2018 Udostępnij Opublikowano 12 lutego 2018 Witam, napisalem plugin na case, z pomoca itachi. wszystko dziala ale koledzy jak zrobic config w stylu takim? Zrobi to ktos? premiumcase: item1: szansa: 10 (w procentach) item: diamond_sword enchant: sharpness, 5 @EventHandler(priority=EventPriority.MONITOR) public void onPlace(BlockPlaceEvent e){ Player p = e.getPlayer(); Block b = e.getBlock(); if(e.isCancelled()){ return; } if(b.getType() == Material.CHEST){ ItemMeta im = p.getItemInHand().getItemMeta(); if(im.getDisplayName() != null){ if(im.getDisplayName().toLowerCase().equalsIgnoreCase(Util.Color("&b&lPREMIUM&6&lCASE"))){ b.setType(Material.AIR); if(Math.random() *100 < 1.1){ ItemStack item1 = new ItemBuilder(Material.DIAMOND_SWORD).addEnchant(Enchantment.DAMAGE_ALL, 5).addEnchant(Enchantment.FIRE_ASPECT, 2).toItemStack(); b.getWorld().dropItemNaturally(b.getLocation(), item1); } if(Math.random() *100 < 1.2){ ItemStack item2 = new ItemBuilder(Material.DIAMOND_PICKAXE).addEnchant(Enchantment.DIG_SPEED, 5).addEnchant(Enchantment.DURABILITY, 3).addEnchant(Enchantment.LOOT_BONUS_BLOCKS, 3).toItemStack(); b.getWorld().dropItemNaturally(b.getLocation(), item2); } if(Math.random() *100 < 0.125){ ItemStack item3 = new ItemBuilder(Material.BEACON).toItemStack(); b.getWorld().dropItemNaturally(b.getLocation(), item3); } if(Math.random() *100 < 10){ ItemStack item4 = new ItemBuilder(Material.IRON_HELMET).addEnchant(Enchantment.PROTECTION_ENVIRONMENTAL, 4).addEnchant(Enchantment.DURABILITY, 3).toItemStack(); b.getWorld().dropItemNaturally(b.getLocation(), item4); } if(Math.random() *100 < 10){ ItemStack item4 = new ItemBuilder(Material.IRON_CHESTPLATE).addEnchant(Enchantment.PROTECTION_ENVIRONMENTAL, 4).addEnchant(Enchantment.DURABILITY, 3).toItemStack(); b.getWorld().dropItemNaturally(b.getLocation(), item4); } if(Math.random() *100 < 10){ ItemStack item4 = new ItemBuilder(Material.IRON_LEGGINGS).addEnchant(Enchantment.PROTECTION_ENVIRONMENTAL, 4).addEnchant(Enchantment.DURABILITY, 3).toItemStack(); b.getWorld().dropItemNaturally(b.getLocation(), item4); } if(Math.random() *100 < 10){ ItemStack item5 = new ItemBuilder(Material.IRON_BOOTS).addEnchant(Enchantment.PROTECTION_ENVIRONMENTAL, 4).addEnchant(Enchantment.DURABILITY, 3).toItemStack(); b.getWorld().dropItemNaturally(b.getLocation(), item5); } if(Math.random() *100 < 0.135){ ItemStack item6 = new ItemBuilder(Material.DIAMOND_PICKAXE).addEnchant(Enchantment.DIG_SPEED, 6).addEnchant(Enchantment.DURABILITY, 2).addEnchant(Enchantment.LOOT_BONUS_BLOCKS, 3).setName(Util.Color("&b&lSuper kilof")).setLore("", Util.Color("&7Tym kilofem kopiesz szybciej"), Util.Color("&eSurowce z rud dropia okolo &e&n3x wiecej"), Util.Color("&c&lKilof ten mozesz naprawic za pomoca &8[&c/repair&8]")).toItemStack(); b.getWorld().dropItemNaturally(b.getLocation(), item6); } if(Math.random() *100 < 14){ ItemStack item7 = new ItemBuilder(Material.DIAMOND, 64).toItemStack(); b.getWorld().dropItemNaturally(b.getLocation(), item7); } if(Math.random() *100 < 10){ ItemStack item9 = new ItemBuilder(Material.EMERALD, 64).toItemStack(); b.getWorld().dropItemNaturally(b.getLocation(), item9); } if(Math.random() *100 < 2.23){ ItemStack item10 = new ItemBuilder(Material.ENDER_PEARL, 8).toItemStack(); b.getWorld().dropItemNaturally(b.getLocation(), item10); } if(Math.random() *100 < 0.146){ ItemStack item11 = new ItemBuilder(Material.DIAMOND_AXE).addEnchant(Enchantment.DAMAGE_ALL, 7).addEnchant(Enchantment.FIRE_ASPECT, 2).addEnchant(Enchantment.DURABILITY, 3).setName(Util.Color("&4&lSiekierka pvp")).setLore("", Util.Color("&7To orginalna siekierka pvp z serwerow &8[&c1.5&8]"), Util.Color("&eKlepa nia to prawdziwa przyjemnosc :)"), Util.Color("&c&lSiekierke mozesz naprawic za pomoca &8[&c/repair&8]")).toItemStack(); b.getWorld().dropItemNaturally(b.getLocation(), item11); } if(Math.random() *100 < 1.11){ ItemStack item12 = new ItemBuilder(Material.BOW).addEnchant(Enchantment.ARROW_KNOCKBACK, 2).addEnchant(Enchantment.ARROW_INFINITE, 1).addEnchant(Enchantment.DURABILITY, 3).toItemStack(); b.getWorld().dropItemNaturally(b.getLocation(), item12); } if(Math.random() *100 < 3.3){ ItemStack item13 = new ItemBuilder(Material.DIAMOND_HELMET).addEnchant(Enchantment.PROTECTION_ENVIRONMENTAL, 4).addEnchant(Enchantment.DURABILITY, 3).toItemStack(); b.getWorld().dropItemNaturally(b.getLocation(), item13); } if(Math.random() *100 < 3.3){ ItemStack item14 = new ItemBuilder(Material.DIAMOND_CHESTPLATE).addEnchant(Enchantment.PROTECTION_ENVIRONMENTAL, 4).addEnchant(Enchantment.DURABILITY, 3).toItemStack(); b.getWorld().dropItemNaturally(b.getLocation(), item14); } if(Math.random() *100 < 3.3){ ItemStack item15 = new ItemBuilder(Material.DIAMOND_LEGGINGS).addEnchant(Enchantment.PROTECTION_ENVIRONMENTAL, 4).addEnchant(Enchantment.DURABILITY, 3).toItemStack(); b.getWorld().dropItemNaturally(b.getLocation(), item15); } if(Math.random() *100 < 3.3){ ItemStack item16 = new ItemBuilder(Material.DIAMOND_BOOTS).addEnchant(Enchantment.PROTECTION_ENVIRONMENTAL, 4).addEnchant(Enchantment.DURABILITY, 3).toItemStack(); b.getWorld().dropItemNaturally(b.getLocation(), item16); } if(Math.random() *100 < 5){ ItemStack item18 = new ItemBuilder(Material.IRON_PICKAXE).addEnchant(Enchantment.DIG_SPEED, 5).addEnchant(Enchantment.DURABILITY, 2).addEnchant(Enchantment.LOOT_BONUS_BLOCKS, 3).toItemStack(); b.getWorld().dropItemNaturally(b.getLocation(), item18); } } } } Odnośnik do komentarza https://skript.pl/temat/25340-config/ Udostępnij na innych stronach Więcej opcji udostępniania...
0 yooniks 347 Opublikowano 13 lutego 2018 Udostępnij Opublikowano 13 lutego 2018 http://hostuje.net/file.php?id=44c724b982211218af7ce7cd00d4b7c3 https://www.virustotal.com/#/file/998df8c0560bde9b2143e20375dde619892416856c6117c474ffa9b8bb4cf2ab/detection Kiedyś napisałem na zlecenie taki premiumcase, ma wszystko to co ty chcesz, gosciu pod siebie podpisal potem plugin Zdekompiluj sobie jd-gui lub luytenem i mozesz popatrzec mniej wiecej jak to wyglada Ever 1 Odnośnik do komentarza https://skript.pl/temat/25340-config/#findComment-168066 Udostępnij na innych stronach Więcej opcji udostępniania...
0 Ever 20 Opublikowano 13 lutego 2018 Autor Udostępnij Opublikowano 13 lutego 2018 mam jd-gui Dziekuje, @yooniks Masz moze skype/ jakis kontakt? I znalazlem ten plugin ktory napisales. Ten typek twierdzi w filmiku ze to jego plugin Odnośnik do komentarza https://skript.pl/temat/25340-config/#findComment-168082 Udostępnij na innych stronach Więcej opcji udostępniania...
0 yooniks 347 Opublikowano 13 lutego 2018 Udostępnij Opublikowano 13 lutego 2018 @Ever skype: [email protected], a co do filmu to on wrzucil tam 70% pluginow ktore ode mnie kupil, a jak sie go pytalem na skype czemu to zrobil to napisal ze jak kupil to sa jego i tyle xd Odnośnik do komentarza https://skript.pl/temat/25340-config/#findComment-168101 Udostępnij na innych stronach Więcej opcji udostępniania...
Pytanie
Ever 20
Witam, napisalem plugin na case, z pomoca itachi. wszystko dziala ale koledzy jak zrobic config w stylu takim? Zrobi to ktos?
premiumcase: item1: szansa: 10 (w procentach) item: diamond_sword enchant: sharpness, 5@EventHandler(priority=EventPriority.MONITOR) public void onPlace(BlockPlaceEvent e){ Player p = e.getPlayer(); Block b = e.getBlock(); if(e.isCancelled()){ return; } if(b.getType() == Material.CHEST){ ItemMeta im = p.getItemInHand().getItemMeta(); if(im.getDisplayName() != null){ if(im.getDisplayName().toLowerCase().equalsIgnoreCase(Util.Color("&b&lPREMIUM&6&lCASE"))){ b.setType(Material.AIR); if(Math.random() *100 < 1.1){ ItemStack item1 = new ItemBuilder(Material.DIAMOND_SWORD).addEnchant(Enchantment.DAMAGE_ALL, 5).addEnchant(Enchantment.FIRE_ASPECT, 2).toItemStack(); b.getWorld().dropItemNaturally(b.getLocation(), item1); } if(Math.random() *100 < 1.2){ ItemStack item2 = new ItemBuilder(Material.DIAMOND_PICKAXE).addEnchant(Enchantment.DIG_SPEED, 5).addEnchant(Enchantment.DURABILITY, 3).addEnchant(Enchantment.LOOT_BONUS_BLOCKS, 3).toItemStack(); b.getWorld().dropItemNaturally(b.getLocation(), item2); } if(Math.random() *100 < 0.125){ ItemStack item3 = new ItemBuilder(Material.BEACON).toItemStack(); b.getWorld().dropItemNaturally(b.getLocation(), item3); } if(Math.random() *100 < 10){ ItemStack item4 = new ItemBuilder(Material.IRON_HELMET).addEnchant(Enchantment.PROTECTION_ENVIRONMENTAL, 4).addEnchant(Enchantment.DURABILITY, 3).toItemStack(); b.getWorld().dropItemNaturally(b.getLocation(), item4); } if(Math.random() *100 < 10){ ItemStack item4 = new ItemBuilder(Material.IRON_CHESTPLATE).addEnchant(Enchantment.PROTECTION_ENVIRONMENTAL, 4).addEnchant(Enchantment.DURABILITY, 3).toItemStack(); b.getWorld().dropItemNaturally(b.getLocation(), item4); } if(Math.random() *100 < 10){ ItemStack item4 = new ItemBuilder(Material.IRON_LEGGINGS).addEnchant(Enchantment.PROTECTION_ENVIRONMENTAL, 4).addEnchant(Enchantment.DURABILITY, 3).toItemStack(); b.getWorld().dropItemNaturally(b.getLocation(), item4); } if(Math.random() *100 < 10){ ItemStack item5 = new ItemBuilder(Material.IRON_BOOTS).addEnchant(Enchantment.PROTECTION_ENVIRONMENTAL, 4).addEnchant(Enchantment.DURABILITY, 3).toItemStack(); b.getWorld().dropItemNaturally(b.getLocation(), item5); } if(Math.random() *100 < 0.135){ ItemStack item6 = new ItemBuilder(Material.DIAMOND_PICKAXE).addEnchant(Enchantment.DIG_SPEED, 6).addEnchant(Enchantment.DURABILITY, 2).addEnchant(Enchantment.LOOT_BONUS_BLOCKS, 3).setName(Util.Color("&b&lSuper kilof")).setLore("", Util.Color("&7Tym kilofem kopiesz szybciej"), Util.Color("&eSurowce z rud dropia okolo &e&n3x wiecej"), Util.Color("&c&lKilof ten mozesz naprawic za pomoca &8[&c/repair&8]")).toItemStack(); b.getWorld().dropItemNaturally(b.getLocation(), item6); } if(Math.random() *100 < 14){ ItemStack item7 = new ItemBuilder(Material.DIAMOND, 64).toItemStack(); b.getWorld().dropItemNaturally(b.getLocation(), item7); } if(Math.random() *100 < 10){ ItemStack item9 = new ItemBuilder(Material.EMERALD, 64).toItemStack(); b.getWorld().dropItemNaturally(b.getLocation(), item9); } if(Math.random() *100 < 2.23){ ItemStack item10 = new ItemBuilder(Material.ENDER_PEARL, 8).toItemStack(); b.getWorld().dropItemNaturally(b.getLocation(), item10); } if(Math.random() *100 < 0.146){ ItemStack item11 = new ItemBuilder(Material.DIAMOND_AXE).addEnchant(Enchantment.DAMAGE_ALL, 7).addEnchant(Enchantment.FIRE_ASPECT, 2).addEnchant(Enchantment.DURABILITY, 3).setName(Util.Color("&4&lSiekierka pvp")).setLore("", Util.Color("&7To orginalna siekierka pvp z serwerow &8[&c1.5&8]"), Util.Color("&eKlepa nia to prawdziwa przyjemnosc :)"), Util.Color("&c&lSiekierke mozesz naprawic za pomoca &8[&c/repair&8]")).toItemStack(); b.getWorld().dropItemNaturally(b.getLocation(), item11); } if(Math.random() *100 < 1.11){ ItemStack item12 = new ItemBuilder(Material.BOW).addEnchant(Enchantment.ARROW_KNOCKBACK, 2).addEnchant(Enchantment.ARROW_INFINITE, 1).addEnchant(Enchantment.DURABILITY, 3).toItemStack(); b.getWorld().dropItemNaturally(b.getLocation(), item12); } if(Math.random() *100 < 3.3){ ItemStack item13 = new ItemBuilder(Material.DIAMOND_HELMET).addEnchant(Enchantment.PROTECTION_ENVIRONMENTAL, 4).addEnchant(Enchantment.DURABILITY, 3).toItemStack(); b.getWorld().dropItemNaturally(b.getLocation(), item13); } if(Math.random() *100 < 3.3){ ItemStack item14 = new ItemBuilder(Material.DIAMOND_CHESTPLATE).addEnchant(Enchantment.PROTECTION_ENVIRONMENTAL, 4).addEnchant(Enchantment.DURABILITY, 3).toItemStack(); b.getWorld().dropItemNaturally(b.getLocation(), item14); } if(Math.random() *100 < 3.3){ ItemStack item15 = new ItemBuilder(Material.DIAMOND_LEGGINGS).addEnchant(Enchantment.PROTECTION_ENVIRONMENTAL, 4).addEnchant(Enchantment.DURABILITY, 3).toItemStack(); b.getWorld().dropItemNaturally(b.getLocation(), item15); } if(Math.random() *100 < 3.3){ ItemStack item16 = new ItemBuilder(Material.DIAMOND_BOOTS).addEnchant(Enchantment.PROTECTION_ENVIRONMENTAL, 4).addEnchant(Enchantment.DURABILITY, 3).toItemStack(); b.getWorld().dropItemNaturally(b.getLocation(), item16); } if(Math.random() *100 < 5){ ItemStack item18 = new ItemBuilder(Material.IRON_PICKAXE).addEnchant(Enchantment.DIG_SPEED, 5).addEnchant(Enchantment.DURABILITY, 2).addEnchant(Enchantment.LOOT_BONUS_BLOCKS, 3).toItemStack(); b.getWorld().dropItemNaturally(b.getLocation(), item18); } } } }Odnośnik do komentarza
https://skript.pl/temat/25340-config/Udostępnij na innych stronach
3 odpowiedzi na to pytanie
Rekomendowane odpowiedzi