Hi Guys, So i have been posting in here for the past few days because i am getting help with plugins and people helping make those plugins and i believe this might be the last time i post in here! I need a plugin that allows players to heal each other (Just like in Minez!) using Bandages (Paper), Rose Red (Blood Bag) & the Shears to apply the ointment! I don't know how this could be done but it would have to be able so that every group in Permissions can use it! Thanks in advance -STAR ;D This plugin HAS been created! Check it out here --> http://dev.bukkit.org/server-mods/healing-bandages/
Sounds hard. So what you need is when you have the paper and the rose red in your inventory you can maybe right click and it heals yourself but uses up 1 of each item?
Not hard, just on PlayerInteractEvent or PlayerInteractEntityEvent then if he right clicks and inhand is 1 of those and if the right clicked entity is an instanceof player make a healing effect to them and remove 1 of those items
Here something like this should work Code:Java @EventHandlerpublic void rightClick(PlayerInteractEntityEvent event){Player p = event.getPlayer(); ItemStack inhand = p.getItemInHand(); //if its a right click and then do if(Entity instanceof Player) if(inhand.getType() == Material.STRING){ p.addPotionEffect(new PotionEffect(PotionEffectType.HEAL,(int) 20L, 10)); p.sendMessage(tag+ChatColor.GOLD+" You have been healed"); p.getInventory().removeItem(new ItemStack(Material.STRING, 1)); } Something like that and just change it
Alright, I'll try make the plugin then. STARSLAY3r I should have the plugin done in a day or two. Should I do it on right click or on command? For now I'll do it on command. EDIT by Moderator: merged posts, please use the edit button instead of double posting.
Okay so here's an example. "Player2 Starts bleeding Player 1 has A bandage, rose red & shear he left clicks those items in that specific order and gives player2, 4 seconds of regen." but if you start bleeding you right click the paper/bandage and it uses it on yourself and heals +1.5 hearts! hopefully this is clear enough. thanks
Well this is what I have: You type the command /healingbandage and it will use up a paper and a red rose from your inventory and you must have shears to use it. Then it will heal you like the /heal or /feed command on other plugins. Maybe after I will add the feature to use it on other players. I hope this is okay. I may also add it so you can left click the player or you while holding shears and it will do the same feature but heal the other player. I will do that in version 1.0.1 of the plugin. STARSLAY3r Can we change the item from being RED_ROSE because I currently can't find a way to use a dye. Any other material will work though. EDIT by Moderator: merged posts, please use the edit button instead of double posting.
It is the item inksack with a damage value, like all dyes ( and wools and stonebricks and stuff like that ).
Now this is the third time I tell you how to do this, and I think in total this is going to be the fifth time somebody tells you how to do this. Code: if (player.getInventory().containsAtLeast(new ItemStack(Material.INK_SACK, 1, (short)1), 1)){ //do stuff here } This will check if the player at least containt ONE red rose dye.. Tested and confirmed! I just tested it.
Junnesejer Yeah but how would I use it for removing an item: player.getInventory().removeItem(new ItemStack(Material.ROSE_RED, 1)); I get errors if I change it to: player.getInventory().removeItem(new ItemStack(Material.INK_SACK, 1, (short)1), 1);
Yeah i know this is from Minez! The way they have it is probably the best way! I did give credit to them because they are awesome guys and i am not trying to make a "Rip off" of Minez. I am making a futuristic game in Minecraft, Minez is a Post Apocalyptic game, I am making a game set out in the Future! Just saying. Just a question please keep in mind i do not know Java! Would you change it to (Material.INK_SACK:1, 1, (short)1), 1); I added in the ":1" behind the "INK_SACK" because the id for rosered/reddye is ":1"! EDIT by Moderator: merged posts, please use the edit button instead of double posting.
Thanks for giving it a shot but Java and Bukkit don't work like in game id's. I got it fixed so it doesn't matter now. Nearly finished. Wrote up the page just doing some final touches: http://dev.bukkit.org/server-mods/healing-bandages/ EDIT by Moderator: merged posts, please use the edit button instead of double posting.
Not even close First of all, you never checked if the clicked entity is player, nor casted it. With that code, whenever you right click (living) entity, the player will receive the effects. Edit: whoops, didn't see the message there
If i need any further help in the future may i call upon one of you guys!? You both seem friendly & nice. ;D Thanks again Thunder for all the help within the past week!
Hey no problem. Creating plugins is my favourite thing at the moment on the computer and I'll be doing it for a while. All I need is good ideas that haven't been taken.
Cool cool! I don't think i have the brain knowledge to learn Java! So any time i need a new plugin i'll msg you. ^_^ See you around -STAR* I actually have an idea for a plugin but there are currently 2 other plugins that do this! If they do not work i will msg you. It's currently 12:01am here :? EDIT by Moderator: merged posts, please use the edit button instead of double posting.