OneTimeCode
This plugin allows you to bind one or more commands into a book, to be used later.
The first page of a book contains usage instructions, while the second page contains the command that will be run.
Permissions:
- otc.create: Allows creating OneTimeCodes
- otc.use: Allows using OneTimeCodes
- otc.permissionmanager: Allows adding and removing permissions to commands
- bukkit.broadcast.admin: Used for viewing usage messages
This plugin requires Vault from version 1.7
Have fun!
will this pass the command as if the player was an OP? It didnt seem to work when I tested with a non-privileged user.
Sir_Speshkitty,
Great work on version 2.0. I tested it on CB 1.6.2-R1.0 and it works a treat.
While player1 was offline, ran the command: /createotc p:player1 t:Day Time u:1 c:/time set day
When player1 joined the server, he received a message to claim his book, which he did with '/claimotc'. Then while holding the book, ran the command '/otc' and set the time successfully. Confirmed that player1 could not set the time with '/time set day'.
I like how the book is stored in the config.yml. This opens up the ability to automate the giving of books via script.
For others who don't know their way around a permissions file like myself, I am just using the ops file.
Thanks.
is there something special you have to do?
I tried making a book and gave it to someone but when he used it he just got told that he didn't had permissions to use the command he did have otc.use but he also needed permission to use the command it self
@Texton
There appears to be a few issues with it right now, I'm not sure where they crept in...
They should all be fixed when I get 1.8 out
@Sir_Speshkitty
Bukkit: This server is running CraftBukkit version git-Bukkit-1.6.2-R0.1-13-g6cfd4a4-b2856jnks (MC: 1.6.2) (Implementing API version 1.6.2-R0.2-SNAPSHOT)
Here is my plugins list, and they are all up to date: Plugins (5): AntiXRay, BanManager, Lockette, Vault, OneTimeCode
I was running the wrong command as Player1, '/otc time set day', but holding the book and running '/otc' only, gives the same error - You don't have permission to set the time
@Texton
The otc.use permission is the permission to use the books, rather than the permission to use the command inside it
At a guess you have more than one plugin with a /time command and only one is being picked up on by OTC. I'll see if I can think up a fix for this.
When you have "Player1: /otc time set day", does that mean a player is using that full command or just "/otc" while holding a book with that?
OK, after more testing, granting the 'otc.use' permission to a group does not allow that user to run the command given. For example:
Admin: /createotc Player1 time set day
Player1: /otc time set day
You don't have permission to set the time
@Texton
Yep, that's possible. I'll spend some time tonight messing with it, and see if I can get it into a 1.8 release :)
Thanks for this plugin, works well. It's great to be able to give my regular players some goodies.
I am looking forward to playing a few mind games, to watch the fun, a bit like Big Brother. Say playerX give two diamonds to playerY (name hardcoded), and playerY give two diamonds to playerZ, and playerZ give two diamonds to playerX, and see what happens ;)
One request that would be awesome, but I don't know if it is possible. Currently the player has to be online to receive an /otc, any chance of being able to /createotc for offline players, and they receive the OTC book when they login?
@ev3rm0r3
This looks a lot like an error I got when I used a plugin that required vault when I did not have vault. Are you sure you have vault installed?
Today's attempt at creating a book that let me shoot a fireball from essentials. The command executed was /createotc ev3rm0r3 fireball, typing /otc with the book yeilded this.
createotc ev3rm0r3 lightning 2013-08-14 22:37:35 [INFO] You have granted ev3rm0r3 a OneTimeCode book! 2013-08-14 22:37:41 [INFO] ev3rm0r3 issued server command: /otc 2013-08-14 22:37:41 [SEVERE] null org.bukkit.command.CommandException: Unhandled exception executing command 'otc' in plugin OneTimeCode v1.7 at org.bukkit.command.PluginCommand.execute(PluginCommand.java:46) at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:19 0) at org.bukkit.craftbukkit.v1_6_R2.CraftServer.dispatchCommand(CraftServe r.java:527) at net.minecraft.server.v1_6_R2.PlayerConnection.handleCommand(PlayerCon nection.java:979) at net.minecraft.server.v1_6_R2.PlayerConnection.chat(PlayerConnection.j ava:890) at net.minecraft.server.v1_6_R2.PlayerConnection.a(PlayerConnection.java :837) at net.minecraft.server.v1_6_R2.Packet3Chat.handle(SourceFile:49) at org.spigotmc.netty.NettyNetworkManager.b(NettyNetworkManager.java:230 ) at net.minecraft.server.v1_6_R2.PlayerConnection.e(PlayerConnection.java :116) at net.minecraft.server.v1_6_R2.ServerConnection.b(SourceFile:37) at org.spigotmc.netty.NettyServerConnection.b(NettyServerConnection.java :125) at net.minecraft.server.v1_6_R2.MinecraftServer.t(MinecraftServer.java:5 92) at net.minecraft.server.v1_6_R2.DedicatedServer.t(DedicatedServer.java:2 39) at net.minecraft.server.v1_6_R2.MinecraftServer.s(MinecraftServer.java:4 81) at net.minecraft.server.v1_6_R2.MinecraftServer.run(MinecraftServer.java :413) at net.minecraft.server.v1_6_R2.ThreadServerApplication.run(SourceFile:5 82) Caused by: java.lang.LinkageError: org/anjocaido/groupmanager/data/User at net.milkbowl.vault.permission.plugins.Permission_GroupManager.playerA dd(Permission_GroupManager.java:132) at net.milkbowl.vault.permission.Permission.playerAdd(Permission.java:18 9) at com.mctoybox.onetimecode.UseCommand.onCommand(UseCommand.java:71) at org.bukkit.command.PluginCommand.execute(PluginCommand.java:44) ... 15 more
- otc.use
No effect. please fix it !