February 13, 20169 yr plis need halp String[] lootItems = { "apple", "orange", "banana" }; if (groundItems.closest(lootItems) != null { wherethemagichappens(); } doesn't werk ples halp tldr; script won't loot items from a string array
February 13, 20169 yr String[] lootItems = { "apple", "orange", "banana" }; if (groundItems.getAll().stream().filter(item -> Arrays.asList(lootItems).contains(item.getName())).count() > 0) { wherethemagichappens(); } Edited February 13, 20169 yr by Token
February 13, 20169 yr Author String[] lootItems = { "apple", "orange", "banana" }; if (groundItems.getAll().stream().filter(item -> Arrays.asList(lootItems).contains(item.getName())).count() > 0) { wherethemagichappens(); } so halpful thx edit: actually, i need your 'item' variable or whatever you set item as lol Edited February 13, 20169 yr by Reminiscence
February 13, 20169 yr You could always do: for(String item: lootItems){ if(groundItems.closest(item) != null) { //do some fun stuff } }
February 13, 20169 yr Author You could always do: for(String item: lootItems){ if(groundItems.closest(item) != null) { //do some fun stuff } } thx bae, it worked
Create an account or sign in to comment