• 欢迎来到Minecraft插件百科!
  • 对百科编辑一脸懵逼?帮助:快速入门带您快速熟悉百科编辑!
  • 因近日遭受攻击,百科现已限制编辑,有意编辑请加入插件百科企鹅群:223812289

Magic/Parameters

来自Minecraft插件百科
跳转至: 导航搜索

Spell Parameters

Spell Properties

There are some base properties of a spell that can't be changed by cast parameters or wand overrides. These properties go at the base level of a spell's configuration, alongside "actions", "effects" and "parameters".

Please check out the Reference Manual for complete descriptions of all spell properties!

Wand Parameters

Wand Customization

Every wand is a unique item, though they may be created from templates. The survival templates can be found here:

https://github.com/elBukkit/MagicPlugin/blob/master/Magic/src/main/resources/examples/survival/wands/

Any of the parameters below may be used in a template, or applied to a wand in-game via any of the following commands

/wand configure
/wand upgrade
/wandp @p configure
/wandp @p upgrade

The "upgrade" command will never lower a value on a wand, and is meant for in-game command block or other
use, to allow players to upgrade their wands, such incrase mana regeneration to a set limit, while not
affecting a wand that already has a higher xp regen.

Note (mainly to other plugin developers) that these parameters are also the NBT tags used to store wand data, under the "wand"
parent node.

Parameters

Please check out the Reference Manual for descriptions of all wand parameters!

Messages

All wand template names and descriptions are contained in messages.yml,
though non-builtin wands may include a default name and description in the wands.yml definition.

EffectLib Parameters

EffectLib effects can be used via an "effectlib" block. The only required parameter in this block is "class", referring to an EffectLib class.

You can use the "fxdemo" spell in-game to preview all of the available effects.

Please check out the Reference Manual for a list of all EffectLib effects and parameters!

Examples

   effects:
      cast:
      - location: target
        effectlib:
          class: AnimatedBall
          duration: 5000

Developers

Developers may want to browse through the doxygen documentation.

Effect Parameters

Effects

Each effect is configured using a "player" class and several common parameters:

| Name | Values | Description
|-------------------|----------------|-----------------
| effectlib | EffectLib | Configuration of an EffectLib effect.
| location | target/origin/both | Where to play the effect
| color | RRGGBB | The main color to use, only applies to some effects (like Fireworks)
| color1 | RRGGBB | The secondary color to use, only applies to some effects (like Fireworks)
| delay | milliseconds | How long to wait before starting the effect
| effect | Effect name | A Bukkit effect, often includes sound and particles
| sound | Sound name | A sound to play, taken from the Bukkit sound constant or sounds.json
| soundvolume | 0.0 - 2.0 | The volume at which to play a sound
| soundpitch | 0.0 - 2.0 | The pitch to use for playing a sound
| particle | Particle name | A Particle type to use, taken from a Magic constant
| particlecount | count | The number of particles to spawn
| particleoffsetx | integer | How much random x-jitter to apply to particles
| particleoffsety | integer | How much random y-jitter to apply to particles
| particleoffsetz | integer | How much random z-jitter to apply to particles
| particledata | integer | A special magic data number, use with care, it can crash the client!!
| particlesubtype | string | A special magic data value, use with care, it can crash the client!!
| firework | Firework Effect | The type of firework to launch, if other firework params are specified without this it will be random
| fireworkpower | integer | The firework power
| fireworkflicker | true/false | Whether or not to flicker the firework effect

Built-in Effects

Magic comes with a few builtin effect players that may be useful, but in general if you're using EffectLib effects, EffectSingle is the only one you need.

Built-in Effect Configuration

| Name | Values | Description
|-------------------|----------------|-----------------
| class | Class name | An effect player class, either a builtin or a fully-qualified external EffectPlayer. Defaults to EffectSingle.

Repeating Effects

| Name | Values | Description
|-------------------|----------------|-----------------
| iterations | count | How many times to repeat the effect
| period | milliseconds | How often to repeat the effect
| reverse | true/false | Whether or not to play the effect in reverse

EffectRing

| Name | Values | Description
|-------------------|----------------|-----------------
| radius | blocks | How large the ring should get
| size | count | How many effects to spawn per ring

EffectTrail

| Name | Values | Description
|-------------------|----------------|-----------------
| length | blocks | The length of the trail, may be automatic if a target was provided.

enum reference: