No one got an idea on that ? Or used it ?
Hello everyone ! I am encountering a problem with stocking enchanting books to Json. I am explaining : I need to stock some data in a file, in a...
IceHower, well, I wanted to see the code, but ok. ^^ Do you have any error in your console ? IceHower Did you have anything in your hand ?...
IceHower And your main class ?
IceHower What do you mean ? The wolves does not appear? Do you have an error ? Send me by pm or post your whole code here, I will have a look tonight.
When you want to got through a list totally, better to use for (final Wolf w : wolves) { //do something } You made a mistake with brackets :...
IceHower And the bone ? Do you want it to get consumed or not ? Correcting what you wrote. For the death, it should not happen with @EventHandler...
IceHower I think you did a mess of the code when copy/pasting again ;) Can you do it again ? And choose language java also. Edit: To be sure :...
IceHower I guess I was not that clear, sorry. I was saying two things : Check if you enter your condition in the PlayerDeathEvent by doing...
IceHower Don't use Player as a key, use name or event better UUID player.getUniqueId() Else, to be sure, check if you enter this, by logging...
Are you declaring this hashmap twice ? HashMap<Player, List<Wolf>> wolfMap = new HashMap<Player, List<Wolf>>(); Line 1 and 38.
Just replace ItemStack bone = new ItemStack(Material.BONE, 1); by ItemStack bone =player.getItemInHand();
yupie_123 : Yeah sorry, ItemStack item = player.getInventory().getItem(player.getInventory().first (Material.SNOW_BALL)); First only returns the...
With something like this. ItemMeta meta =player.getItemInHand().getItemMeta(); List<String> lore = new ArrayList<String>();...
yupie_123 I think I got it. player.getInventory.removeItem(new ItemStack(Material.SNOW_BALL, 1)); It removes the ItemStack if it matches with...
Minermax7 Try player.launchProjectile(Arrow.class). EDIT : Check out the documentation...
xAstraah : Never had to use event on Inventory. Good to know :)
Barnyard_Owl : True, no reason to do that, since it is enum.
xAstraah :From the doc I thought when seeing that in the doc that you could not use it, but instead other events extending this one. ;) But if...
Do getType(), your test becomes (Material.Bone.compareTo(player.getItemInHAnd().getType())==0) And I think it is launchProjectile(Arrow.class)...
Separate names with a comma.