Command Reference

Command Reference

/otc

Uses an OTC book. If the held item isn't an OTC book, will provide a basic command reference.
Permission: otc.use

/claimotc

Used to claim any OTC books a player has pending to them.
Permission: otc.use

/createotc

This command is for creating an OTC book. Every argument is optional!
Permission: otc.create

Usage:

/createotc [p:player] [t:title] [u:uses] [c:command1] [c:command2...]

Example:

/createotc p:Sir_Speshkitty t:Become Stone u:10 c://hpos1 c://hpos2 c://set 1

This example will create a book, give it the title "Become Stone", set it to have 10 uses, and add the commands "//hpos1", "//hpos2", and "//set 1" to it. It will then grant the book to Sir_Speshkitty, to be claimed with /claimotc.

If the player is omitted, the book will be placed in the user's inventory and left unsealed.

/grantotc

Usage:

Use while holding a OTC book

Description:

This is used to grant a OTC book to another player, to be claimed with /claimotc
Permission: otc.use

/modifyotc

Usage:

Use while holding a OTC book

  • /modifyotc title <newtitle> - Sets the held OTC book's title to <newtitle>
  • /modifyotc addcommand <command> - Used to add a command to the end of the book. Commands are held on page 2.
  • /modifyotc setcommand <linenumber> [command] - Used to set a specific command at a line on page 2 of the book, overwriting what was there before. If no command is entered, the line is removed.
  • /modifyotc insertcommand <linenumber> <command details> - Used to insert a command at the specified line number.
  • /modifyotc uses <number> - Sets the number of uses remaining in the book

Permission: otc.create

/sealotc

Usage:

Use while holding a OTC book
Permission: otc.use

Description:

Used to seal an OTC book
A sealed OTC book cannot be modified with /modifyotc.

/otcaddperms

Usage

  • /otcaddperms <command> <permissions>

Example: /otcaddperms gamemode bukkit.command.gamemode essentials.gamemode
Permission: otc.permissionmanager

Description

Adds permissions to be temporarily granted when a book is used
Can take any number of permissions

/otcremoveperms

Usage

  • /otcremoveperms <command> <permissions>

Example: /otcremoveperms gamemode bukkit.command.gamemode essentials.gamemode
Permission: otc.permissionmanager

Description

Removes permissions from being temporarily granted when a book is used
Can take any number of permissions

/otclistperms

Usage

  • /otclistperms <command>

Example: /otclistperms gamemode
Permission: otc.permissionmanager

Description

Shows all permissions that will be granted when a command in a book is used

User entered arguments

From v2.2 onwards, OneTimeCode supports adding arguments to commands on use by adding %1% or any other number into the command

Example

You want your player to be able to set a block to any type of wood.
Simply use:

  • /createotc Sir_Speshkitty t:Set Wood u:10 c://hpos1 c://hpos2 c://set 5:%1% To create a book that will take one argument, to be used like:
  • /otc 5 for Dark Oak Wood Planks

To use more arguments, simply use %2%, %3%, %4% or any number you want
The number simply corresponds to the argument position, so for example:

  • A book with /wb %w% set %1% %2% %2%
  • Used with /otc 1000 0

Would resolve as the command "/wb world set 1000 0 0"


Comments

Posts Quoted:
Reply
Clear All Quotes