Skocz do zawartości
  • 0

Config


Ever

Pytanie

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

  • 0

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 :v Zdekompiluj sobie jd-gui lub luytenem i mozesz popatrzec mniej wiecej jak to wyglada

Odnośnik do komentarza
https://skript.pl/temat/25340-config/#findComment-168066
Udostępnij na innych stronach

Nieaktywny
Ten temat został zamknięty. Brak możliwości dodania odpowiedzi.
  • Ostatnio przeglądający   0 użytkowników

    • Brak zarejestrowanych użytkowników przeglądających tę stronę.
×
×
  • Dodaj nową pozycję...