PotionCommands
PotionCommands
Ever wanted to apply a potion that you can’t brew? Forgot a brewing recipe? Not a problem! With PotionCommands, just type a command, and apply almost any potion effect to anyone!
Important notice regarding issues, feature requests
Please submit bugs, feature requests etc to this page:
https://github.com/np98765/PotionCommands/issues
Commands:
/potion [user] <effect> [duration] [amplifier]: Applies potion effect to player.
- <user>: Choose who to apply the effect to
- <effect>: Choose from one of the potion effects below
- [duration]: Choose how long the effect will last (in ticks). If you don’t specify a value, it will use the config file values (also in ticks)
- [amplifier]: Allows you to adjust the strength of each effect, both positive and negative (e.g. negative fastdig = slowdig)
/potion effects: Lists all potion effects.
- Requires PotionCommands.effects
/rpotion <effect> <user>: Removes effect from specified user.
- Very little error checking yet, you must supply the user (it won't yet use the command sender)
- Requires PotionCommands.remove — need to add per-effect permissions to this one
/particle <player> <hexcolor> <duration ticks (seconds / 20)>: Adds particle effects to player without adding a potion effect.
- Advanced users only
- Example — /particle lol768 #ffff00 100 (applies yellow bubbles to player lol768 for 5 seconds
- Requires PotionCommands.particle
Potion Effects:
Potion Effect | Acceptable Names | Permission Node |
---|---|---|
Blindness | Blindness, blind | PotionCommands.effect.blindness |
Confusion | Confusion, confuse, nausea | PotionCommands.effect.confusion |
Damage Resistance | Dmgresist, dr | PotionCommands.effect.damageresistance |
Haste | Haste, fastdig, digspeed, dig | PotionCommands.effect.haste |
Fire Resistance | Fireresistance, fr | PotionCommands.effect.fireresistance |
Harm | Harm, harming | PotionCommands.effect.harming |
Heal | Heal, healing | PotionCommands.effect.healing |
Hunger | Hunger | PotionCommands.effect.hunger |
Jump Boost | Jumpboost, highjump, jump | PotionCommands.effect.jumpboost |
Poison | Poison | PotionCommands.effect.poison |
Regeneration | Regeneration, regen | PotionCommands.effect.regeneration |
Slowness | Slowness, slow | PotionCommands.effect.slowness |
Swiftness | Swiftness, swift, speed | PotionCommands.effect.swiftness |
Increase Damage | Strength, strong | PotionCommands.effect.strength |
Water Breathing | Waterbreathing, breathing, wb | PotionCommands.effect.waterbreathing |
Weakness | Weakness, weak | PotionCommands.effect.weakness |
Other Effects:
These are cool “effects” that I found while experimenting.
Other Effect | Acceptable Names | Permission Node |
---|---|---|
Scare | Freakout, scare | PotionCommands.effect.scare |
Flicker | Flicker | PotionCommands.effect.flicker |
Note on permissions: Users MUST have PotionCommands.use to be able to use ANY of the effects. You must give them PotionCommands.use in addition to the per-effect nodes.
To Do:
- Add a maximum duration to avoid errors
Add per-effect permissionsCompleted as of v1.1
Other:
- Please note that durations aren’t perfect. You may be limited by the maximum amount of time that the game allows you to have the potion effect
- Harming and healing: These are currently instant kill and full heal, respectively, due to the input of seconds, not ticks. I am trying to fix this.
- Please report any and all bugs you may find!*
Special Thanks:
Special thanks to th3cleaner@mcservers for creating the logo and banner!
Source and dev builds
Source code is available here: https://github.com/np98765/PotionCommands/
@Japven
Could you clarify as to exactly what you want? A message when the potion is successfully applied?
@Diabloste
Right, I can tell you it's not my fault. What seems to be happening is that when I'm recompiling the plugin, old pieces of code are somehow re-emerging and being built into the plugin. I just tested the build available here and did the command "/potion effects". This gave me the error: Bad syntax: /potion <effect> <player> [duration]
That message is not in any of my code, and was removed a while back. From this I can conclude that something strange is happening during the build process.
@Diabloste
Let me take a look.
@lol768
Can you add changing potion message ?
@weirdiolio
Agreed with this, but instead of just saying it doesn't work I'll specifically give you the error upon using the simple /potion command.
"2012-10-19 12:18:10 [SEVERE] null
org.bukkit.command.CommandException Unhandled exception executing command 'potion' in plugin PotionCommands v1.2
at org.bukkit.command.PluginCommand.execute(PluginCommand.java:42)
at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:168)
at org.bukkit.craftbukkit.CraftServer.dispatchCommand(CraftServer.java:492)
at net.minecraft.server.NetServerHandler.handleCommand(NetServerHandler.java:880)
at net.minecraft.server.NetServerHandler.chat(NetServerHandler.java:826)
at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:808)
at net.minecraft.server.Packet3Chat.handle(Packet3Chat.java:44)
at net.minecraft.server.NetworkManager.b(NetworkManager.java:276)
at net.minecraft.server.NetServerHandler.d(NetServerHandler.java:109)
at net.minecraft.server.ServerConnection.b(SourceFile:35)
at net.minecraft.server.DedicatedServerConnection.b(SourceFile:30)
at net.minecraft.server.MinecraftServer.q(MinecraftServer.java:578)
at net.minecraft.server.DedicatedServer.q(DedicatedServer.java:213)
at net.minecraft.server.MinecraftServer.p(MinecraftServer.java:474)
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:406)
at net.minecraft.server.ThreadServerApplication.run(SourceFile:539)
Caused by: java.lang.ArrayIndexOutOfBoundsException 0
at com.lavacraftserver.PotionCommands.PotionCommands.onCommand(PotionCommands.java:244)
at org.bukkit.command.PluginCommand.execute(PluginCommand.java:40)
... 15 more"
Also using it from the console:
"2012-10-19 12:17:15 [SEVERE] org.bukkit.command.CommandException Unhandled exception executing command 'potion' in plugin PotionCommands v1.2
2012-10-19 12:17:15 [SEVERE] at org.bukkit.command.PluginCommand.execute(PluginCommand.java:42)
2012-10-19 12:17:15 [SEVERE] at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:168)
2012-10-19 12:17:15 [SEVERE] at org.bukkit.craftbukkit.CraftServer.dispatchCommand(CraftServer.java:492)
2012-10-19 12:17:15 [SEVERE] at org.bukkit.craftbukkit.CraftServer.dispatchServerCommand(CraftServer.java:488)
2012-10-19 12:17:15 [SEVERE] at net.minecraft.server.DedicatedServer.ai(DedicatedServer.java:249)
2012-10-19 12:17:15 [SEVERE] at net.minecraft.server.DedicatedServer.q(DedicatedServer.java:214)
2012-10-19 12:17:15 [SEVERE] at net.minecraft.server.MinecraftServer.p(MinecraftServer.java:474)
2012-10-19 12:17:15 [SEVERE] at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:406)
2012-10-19 12:17:15 [SEVERE] at net.minecraft.server.ThreadServerApplication.run(SourceFile:539)
2012-10-19 12:17:15 [SEVERE] Caused by: java.lang.ArrayIndexOutOfBoundsException 0
2012-10-19 12:17:15 [SEVERE] at com.lavacraftserver.PotionCommands.PotionCommands.onCommand(PotionCommands.java:244)
2012-10-19 12:17:15 [SEVERE] at org.bukkit.command.PluginCommand.execute(PluginCommand.java:40)
2012-10-19 12:17:15 [SEVERE] ... 8 more
2012-10-19 12:17:15 [SEVERE] Encountered an unexpected exception CommandException
org.bukkit.command.CommandException Unhandled exception executing command 'potion' in plugin PotionCommands v1.2
at org.bukkit.command.PluginCommand.execute(PluginCommand.java:42)
at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:168)
at org.bukkit.craftbukkit.CraftServer.dispatchCommand(CraftServer.java:492)
at org.bukkit.craftbukkit.CraftServer.dispatchServerCommand(CraftServer.java:488)
at net.minecraft.server.DedicatedServer.ai(DedicatedServer.java:249)
at net.minecraft.server.DedicatedServer.q(DedicatedServer.java:214)
at net.minecraft.server.MinecraftServer.p(MinecraftServer.java:474)
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:406)
at net.minecraft.server.ThreadServerApplication.run(SourceFile:539)
Caused by: java.lang.ArrayIndexOutOfBoundsException 0
at com.lavacraftserver.PotionCommands.PotionCommands.onCommand(PotionCommands.java:244)
at org.bukkit.command.PluginCommand.execute(PluginCommand.java:40)
... 8 more"
dosent work :(
Pretty much all issues have been fixed/implemented. Feel free to suggest more!
@watdidyusaey
This is on the issue list.
@watdidyusaey
Currently working on this.
@DerHolzhacker
It's on github, here: https://github.com/np98765/PotionCommands/
@WhyRU2EZez
I'm looking into adding these extra commands. At the moment I'm currently rewriting stuff to make it look a bit better.
https://github.com/np98765/PotionCommands
@AndyMcB1
Might be better to get a dedicated plugin that allows commands on spawn
You have to make it like /potion <effect><level> <playername> <time (X="" would="" be="" infinite)="">
Cool plugin :D
Can you have a command excute as you spawn? So like Player1 spawns /potion slowness player1 600
can u add permissions for self use only?
Can i have the Source Code maybe? :D
Why? I'm lerning Java and Plugin Coding...but i fail always by the potions :)
Dear DerHolzhacker
@OliverDollar
There may be, but the command gets too lengthy.
/potion <effect> <user> <intensity> [duration]
or something of the sort.
In the future, I may add something like:
/potion e:<effect> u:<user> [i:intensity] [t:duration]
@np98765
Can you also add a command that removes all potion effects?
Is there way to choose how strong the effect is? E.g: swiftness 2