Skip to content
JasperLorelai edited this page May 19, 2024 · 3 revisions

Source Code

spell-class: ".command.ScrollSpell"

Description:

This spell creates scrolls from a required held material, binding a spell onto it. You can pass a spell to be bound to the scroll using the cast command or subspell args. You can also optionally pass the number of uses of this scroll. If none are passed, default-uses are used for that amount. Uses may be a negative number to specify infinite uses.

Configuration:

Since 4.0 Beta 13 some of these options support dynamic values through numeric or string expressions.

Option Description Type Default Supports expressions
predefined-scrolls This is an optional way to associate a scroll with a specific item configuration. List of formatted strings: <durability> <spell> <uses>. uses are optional, since default-uses will be used instead. String List false
item-id Defines a material that must be held for it to be turned into a scroll item. Material "paper" false
str-usage Sent if no spell cast arguments are passed. Rich Text "You must hold a single blank paper \nand type /cast scroll <spell> <uses>." true
str-on-use Rich Text "Spell Scroll: %s used. %u uses remaining." true
str-no-spell Rich Text "You do not know a spell by that name." true
str-use-fail Rich Text "Unable to use this scroll right now." true
str-cant-teach Rich Text "You cannot create a scroll with that spell." true
str-scroll-name Rich Text "Magic Scroll: %s" true
str-scroll-subtext Rich Text "Uses remaining: %u" true
str-console-usage Rich Text "Invalid arguments defined!\nValid arguments: <playerName> <spell> <scrollUses>" true
max-uses This helps clip pass uses down to a maximum value. Integer 10 false
default-uses If no uses are passed with spell cast arguments, this is how many are used. Integer 5 false
cast-for-free Defines whether reagents are enabled for this spell. Boolean false false
left-click-cast Defines whether to allow left-click cast. Boolean true false
right-click-cast Defines whether to allow right-click cast. Boolean true false
ignore-cast-perm Defines whether the player is given cast permissions to cast the scroll spell. Boolean true false
require-teach-perm Defines whether teach permissions for the passed spell are required to imbue their handheld item with that spell. Boolean false false
bypass-normal-checks If true, this spell is cast with direct cast mode, otherwise it is cast with hard mode. Boolean false false
remove-scroll-when-depleted Defines whether the scroll item is removed once depleted. Boolean false false
require-scroll-cast-perm-on-use Defines whether the scroll user is required permission to cast this scroll spell. This is a way to only allow players who can create this scroll to use it. Boolean false false
charge-reagents-for-spell-per-charge Defines whether reagents of the passed spell are charged per use. Boolean false false

Additional Placeholders:

  • str-cast-self:
    • %s: Spell name.
  • str-scroll-name/subtext:
    • %s: Spell name.
    • %u: Uses left.
Clone this wiki locally