Inactive [FUN/ADMN] PotionCraft v2.2.1 - Give yourself a potion effect [1.2.5-R4.0]

Discussion in 'Inactive/Unsupported Plugins' started by legomaster181, Apr 17, 2012.

  1. Offline

    legomaster181

    PotionCraft v2.2.1 by legomaster181

    Using this mod, you can give you or anyone else on your server any potion effect you want! The potion effect is completely customizable, so you can choose the effect, the duration, and the potency (strength). You can also choose to get all the positive potion effects, and all the negatives! You can also go past the normal potion effect potency limit, so you can jump higher then the sky limit! You can also give you the instant health effect for an amount of time, giving you essentially god mode, and the same with instant damage. Also, since this is my first plugin, my first time with the API, and I'm relatively new at Java, I won't be able to get updates out very fast, but this version isn't buggy at all.




    Commands:
    Template: [] = optional, () = required





    Help:
    Format: /pc help
    Description: Displays a help menu that lists all the commands.
    Permission: none
    Remove:
    Format: /pc remove
    Description: Removes all potion effects from you.
    Permission: potioncraft.remove
    Reload:
    Format: /pc reload
    Description: Reloads the config file if you have made changes to it.
    Permission: potioncraft.reload
    God:
    Format: /pc god [player]
    Description: Gives you or the player chosen god mode, or if they already have it take it away.
    Permission: potioncraft.god
    Effect:
    Format: /e [player] (effect) (duration) (potency)
    Description: Adds a the potion effect chosen to you with the duration and potency specified.
    Permissions:
    potioncraft.effect.* gives the ability to give all effects to anyone including yourself. If you want someone to have access to just one potion effect, give them potioncraft.effect.(effect name).
    For example, if you gave someone potioncraft.effect.heal, they could only give themselves or other people the Instant Health potion effect. Please let me know if this is too confusing.

    If you just type the /e you get a list of all the potion effects available.

    Download Link: Download (always will be the most recent version)

    Changelog

    Template:
    + = Added
    - = Removed
    * = Fixed

    6/23/12
    v2.2.1
    *Added in the fire resistance potion effect.

    6/9/12
    v2.2
    +Added an in-game command to giving/taking away god mode.

    6/8/12
    v2.1.2
    *Fixed permissions, now instead of checking if the target has permission, it will check if the sender does. Sorry for the mixup.
    *Fixed /pc reload not reloading the list of gods from the config file.

    Old Changelogs:
    Show Spoiler
    5/24/12
    v2.1.1 - Removed the option to disable potion effects from the config file, because that was made redundant because of the permissions. Also, fixed the version number.
    v2.1 - More advanced permissions! Now, there is a permission node for every command, and even every potion effect has a permission node, so you can restrict which people can use which potion effects!
    v2.0 - Separated the effect command from all the other commands, now can be accessed from /e or /effect. Also, lots of code changes to make the plugin more efficient. Lots less errors now! :D

    5/21/12
    v1.3 - Added god mode, currently added to players through the config file.

    5/12/12
    v1.2 - Added a config file, where you can choose which effects are able to be added, and which aren't.

    5/9/12
    v1.1.1 - Now compiling on Java 1.6, should fix most problems people have been having.

    5/8/12
    v1.1 - Added permissions!

    4/17/12
    v1.0.1 - Fixed it so you can type in the actual effect name, and the programmatic effect name. :p
    v1.0 - Initial release


    To-Do List:

    (Almost implemented) A forever duration, where the effect will keep resetting itself when it reaches 1 second left.
    More!
     
    MinopolisMc, donutlover9 and IBlaze56 like this.
  2. Offline

    Dreeass

    Adding a list of potioneffects would always be helpful! ;) On the page or in the plugin and try shortening /potioncraft to /effect, /pc, /potion, etc.
     
  3. Offline

    legomaster181

    I actually already have those implemented, but I made it a bit more clear on the post.
     
  4. Offline

    Plague

    released
     
  5. Offline

    ocomobock

    Could you please add permissions to it?
     
  6. Offline

    legomaster181

    I totally forgot about that, so sorry. Updating now. Also, if you like this plugin, please reply. It'll help my problem with my short attention span and hopefully inspire me to work on this hard.

    Added permissions, the node is potioncraft.potion. If that doesn't work, or isn't enough please let me know.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 25, 2016
  7. Offline

    ocomobock

    Thank you! I actually enjoy this plugin a lot. I merged it with this plugin to make it so whenever you step on certain blocks, you get a potion effect. There are tons of possibilities with this, so thanks for making it.
     
  8. Offline

    Zerkhan

  9. Offline

    Gridlock777

    Getting this error at startup:
    2012-05-09 11:53:47 [SEVERE] Could not load 'plugins\PotionCraft.jar' in folder 'plugins'
    org.bukkit.plugin.InvalidPluginException: java.lang.UnsupportedClassVersionError: com/me/legomaster181/PotionCraft : Unsupported major.minor version 51.0
    at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:150)
    at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.java:305)
    at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:230)
    at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:213)
    at org.bukkit.craftbukkit.CraftServer.<init>(CraftServer.java:189)
    at net.minecraft.server.ServerConfigurationManager.<init>(ServerConfigurationManager.java:53)
    at net.minecraft.server.MinecraftServer.init(MinecraftServer.java:156)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:422)
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:492)
    Using latest betabuild: 1.2.5-R1.3

    Also is there anway that you could perhaps make a custom potion with say something like speed V or have it last 16 minutes? This plugin reminds me of the Tim The Enchanter one for enchantments and having custom-brewed potions would make this plugin so much cooler.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 25, 2016
  10. Offline

    The Micahel

    Hey! Is there a way to make the effects last for ever? I want admins to allways have the regeneration one on them!

    Thanks,
    The Micahel
     
  11. Offline

    legomaster181

    Looking at why this won't work, probably because I never built against build 1.2.5-R1.3, just 1.2.5-R1.0. Let me see if I can fix it.

    You mean making it so you can brew potions that have those effects? Or do you just mean typing in a command while holding a potion and having the effect being applied to the potion, not to you.

    I'll look into making this a feature that works, for now just give it to your admins for a crazy amount of time. :p

    I think I fixed it, try with the newest build and let me know what happens.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 25, 2016
  12. Offline

    legomaster181

    Added a config file! Now you can choose which effects are active, and which can't be applied to a person! Also added a command, /potioncraft reload! This just reloads the config file if you just made changes. Please reply with any bugs that you find!

    Also, I have a new build that should add a command that removes all the effects from you, but unfortunately there's a bug in the api that breaks this, so I won't release it until there's a fix. Just letting you know that it's ready!

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 25, 2016
  13. Offline

    The Micahel

    Thanks for the reply to my before post,
    what i do is
    /pc -Player- Regeneration 9999999999999999 3
    that will give it to me for aprox: 1666666666666666 minutes

    Also, is there a way if i restart the server, that when an admin logs in, it automatically gives them regeneration?

    Thanks for your help! BTW. love the plugin :)

    The Micahel
     
  14. Offline

    MikuPL

    Is it possible to make /potion work in console?
    Because everytime I try to use it, i got this:
    Code:
    [WARNING] Unexpected exception while parsing console command
    org.bukkit.command.CommandException: Unhandled exception executing command 'potion' in plugin PotionCraft v1.1.1
            at org.bukkit.command.PluginCommand.execute(PluginCommand.java:42)
            at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:166)
            at org.bukkit.craftbukkit.CraftServer.dispatchCommand(CraftServer.java:479)
            at org.bukkit.craftbukkit.CraftServer.dispatchServerCommand(CraftServer.java:475)
            at net.minecraft.server.MinecraftServer.b(MinecraftServer.java:603)
            at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:572)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:450)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:492)
    Caused by: java.lang.NullPointerException
            at com.me.legomaster181.PotionCraft.onCommand(PotionCraft.java:38)
            at org.bukkit.command.PluginCommand.execute(PluginCommand.java:40)
            ... 7 more
    
     
  15. Offline

    legomaster181

    I've actually had that feature in the making for a bit now, I just went on vacation so I haven't released it yet. I think I left it with a bug in it, I'll see what I can do about fixing and releasing!

    I thought it should work, I'll take another look at it. Thanks for your patience!

    Added god mode! Currently the only way to add people is in the config, but soon you will be able to do it in game. Also, I'm working on an update that will change the plugin a lot, and is hard so it might be a while before the next update.

    That took less time then I thought! Let me introduce you to PotionCraft 2.0! There is one big change, but this update was mainly a code improving update. The one big change is now instead of using /pc to add an effect to a person, you use /e. This makes it much easier to detect if a command isn't available, like typing /pc asdf used to throw an error, but not it's much cleaner. Let me know if there is any bugs, as this is my biggest update yet and I bet there will be some. have fun! :D

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 25, 2016
  16. Offline

    legomaster181

    Another update today! Now there is a permission node for each command, and there are permission nodes for each potion effect, eg. potioncraft.effect.confusion. Soon I will be taking away the config file disabling of potion effects, as this update makes that feature redundant.

    EDIT: Already done, with update 2.1.1. Also, fixed version 2.1 saying 2.0.
     
  17. Offline

    MikuPL

    Em... this version is weird. Now if I want to use eg. /e somebody blindness 15 1 I need to give him permission 'potioncraft.effect.blindness' but with it, he may use /e [nick] [effect] [time] [potency] on everybody else...

    Am I doing something wrong?
     
  18. Offline

    legomaster181

    Sorry, I guess I wasn't clear enough. You give, let's say potioncraft.effect.confusion to someone. They can give only that effect to themselves or someone else. If you give them potioncraft.effect.*, they can give any effect to themselves and others. Also, all commands are enabled by default for ops.
     
  19. Offline

    MikuPL

    Well, I have an asterix (*) permission but still can't use /e on other players. It says that i haven't got permissions. But when I add permission to eg. default group 'potioncraft.effect.*' I can use any effect on them. But then they can use /e too...
     
  20. Offline

    pom32

    put a cap on the potion potency level
    If you put it too high then the client and server cannot interact any more and the only way to fix it is to delete the player.dat
     
  21. Offline

    legomaster181

    Ah hah! I know what the problem is, and I'll fix it right away!

    Any idea what that max might be?
     
  22. Offline

    pom32

    i think the max is different for every for every potion and im not gonna go testing for every max its too dangerous and long process
     
  23. Offline

    jackdh

    I keep getting "you do not have permission to do that" to anyone who is not op? Why.
     
  24. Offline

    williewillus

    I get this too, and I have full permissions/op. Even console gets no permission.
     
  25. Offline

    trumankitos13

    i get this error when i do a /e
    Code:
    2012-06-08 14:11:01 [SEVERE] null
    org.bukkit.command.CommandException: Unhandled exception executing command 'e' in plugin PotionCraft v2.1.1
    at org.bukkit.command.PluginCommand.execute(PluginCommand.java:42)
    at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:166)
    at org.bukkit.craftbukkit.CraftServer.dispatchCommand(CraftServer.java:479)
    at net.minecraft.server.NetServerHandler.handleCommand(NetServerHandler.java:821)
    at net.minecraft.server.NetServerHandler.chat(NetServerHandler.java:781)
    at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:764)
    at net.minecraft.server.Packet3Chat.handle(Packet3Chat.java:34)
    at net.minecraft.server.NetworkManager.b(NetworkManager.java:229)
    at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:113)
    at net.minecraft.server.NetworkListenThread.a(NetworkListenThread.java:78)
    at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:558)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:450)
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:492)
    Caused by: java.lang.NumberFormatException: For input string: "slow"
    at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
    at java.lang.Integer.parseInt(Integer.java:492)
    at java.lang.Integer.parseInt(Integer.java:527)
    at com.me.legomaster181.PotionCraft.onCommand(PotionCraft.java:163)
    at org.bukkit.command.PluginCommand.execute(PluginCommand.java:40)
    ... 12 more
     
  26. Offline

    legomaster181

    I'm so sorry about all the problems everyone's been having. I did that update on vacation, so I guess it wasn't the best update. Last time I do that! I put out a new update that should fix all the problems with permisions, Now I'll take a look at the rest.
     
  27. Offline

    kanejaxon

    Very nice Plugin! Im trying it right away!
     
  28. Offline

    Creeps'

    Not FireResistance ?
     
  29. Offline

    legomaster181

    It should work, try typing in /e, it will bring up in the list of all potion effects. Type it in exactly as you see it there, and if it still doesn't work come back.
     
  30. Offline

    Creeps'

    The list is: Blindness, Confusion, DamageResistance, FastDigging, Harm, Heal, Hunger, IncreaseDamage, Jump, Poison, Regeneration, Slow, SlowDigging, Speed, WaterBreathing, Weakness.
    Not FireResistance... :oops:
     

Share This Page