I would like a plugin that when you type /potion, it stacks all potions in your inventory. But if the potion is stacked, then you cannot throw it, you have to unstack it to throw them. Thanks! O ya, forgot to mention, no permissions are needed. EDIT by Moderator: merged posts, please use the edit button instead of double posting.
Just a tip, developers are doing this for free. They'll be more likely to help someone that's patient and follows the rules of the forum.
What rule did i break? I followed them all.... O ya, i bumped 30 minutes early... Sorry, i had to go to school :/ Just trying to keep this on top so more devs can see it. EDIT by Moderator: merged posts, please use the edit button instead of double posting.
Why do i think that he only wants to see the source code of the plugin if someone does this? *cough*http://dev.bukkit.org/server-mods/stacker/*cough*
I dont know how to do this, so i asked someone else to do it for me. I made stacker for my personal server, and decided to upload it. I havent updated it lately, i have many new versions, and i wouldnt mind AT ALL if i dont receive the source for this. It was requested on my server, and i tried to figure out how to do this. I couldnt figure out how, and now i am coming here for help.
Well could i see the source code of the Stacker plugin, so i see how you did it earlier.. and i can try it with potions
I'm new to the dev scene and trying to do some random projects to get my feet wet. This seems like a pretty good one to try. A majority of the requests are pretty intense Hopefully I'll be able to get something working pretty soon So how do you want it to handle if the player has a stack of potions and also some unstacked potions and they do /potion? For now I'm going to make it so if they have any unstacked potions, /potion adds them to the stacked set. So only if you have no unstacked potions will /potion unstack your stacked set. edit: I'm dumb, you probably just want them to have to unstack then with clicks? I guess I'll act under that assumption. EDIT by Moderator: merged posts, please use the edit button instead of double posting.
Here is the source: http://pastie.org/5047573 BTW: i requested this to made on the forums, and sort of updated it (There was an error when you typed /stack). I'm learning Java now, so i dont 100% understand how this works.
o ok I have a code that adds up all the mushroomsoup in your inventory, takes it out, and then adds it back, and its stacked. The code is above if you want to take a look at it.
[quote uid=90712918 name="Woobie" post=1370965]You should pay attention on what wristdirect says, i dont want to steal this from him[/quote] No problem, I'm doing this mostly just to learn the basics of the Bukkit API. Steal away if you want [quote uid=90588064 name="Techtony96" post=1370990] I have a code that adds up all the mushroomsoup in your inventory, takes it out, and then adds it back, and its stacked. The code is above if you want to take a look at it.[/quote] I actually have that part of it finished already, just working on dealing with all the different potion types, as that presents its own problem. And lastly making sure you can't throw then if they're stacked. But again, no worries if someone finishes it before me. I'm in it for the learning experience Ok I have it all finished. Checks for all types of potions and stacks accordingly. Also doesn't allow stacked potions to be thrown Oh, I didn't check for potion drinking though...well here's this file, I'll get that last part working asap. edit: Here's the version with drinking potion checks too. <Edit by Moderator: Redacted mediafire url> Also, added to BukkitDev, awaiting approval. Double Edit!: Btw tony, I did use your basic idea with Stacker for the checking/replacement algorithm. I just added on checks for potions and potion types, then a couple listeners for projectile launching and player consuming events And good job on Stacker, I like the idea EDIT by Moderator: merged posts, please use the edit button instead of double posting.
[quote uid=16593 name="wristdirect" post=1371101]Ok I have it all finished. Checks for all types of potions and stacks accordingly. Also doesn't allow stacked potions to be thrown Oh, I didn't check for potion drinking though...well here's this file, I'll get that last part working asap. edit: Here's the version with drinking potion checks too. <Edit by Moderator: Redacted mediafire url> Also, added to BukkitDev, awaiting approval. Double Edit!: Btw tony, I did use your basic idea with Stacker for the checking/replacement algorithm. I just added on checks for potions and potion types, then a couple listeners for projectile launching and player consuming events And good job on Stacker, I like the idea[/quote] Thanks for the quick turn around on this! Problem though, when i try to type /potion, it says i have no potions to stack, even though i only have 2 potions in my inventory, of the same kind. Not sure what is wrong with it here? Also, can i have the source and/or the permission to decompile it? I can give you credit if i put it into my stacker plugin. Thanks again!
Oh, I see my problem, I forgot to include the base potions. I'll add that in and upload the source. Here you go! <Edit by Moderator: Redacted mediafire url> <Edit by Moderator: Redacted mediafire url> edit: lol sorry for the constant small changes. I had to make sure I handled the drinking potion listener better. I made sure it only triggered if you were doing a right click event with the potion. It used an event cancelling method, so if you were breaking a block or opening a door (not for long with the door thing!) with a potion in your hand, it might cancel it. Fixed that! <Edit by Moderator: Redacted mediafire url> EDIT by Moderator: merged posts, please use the edit button instead of double posting.