Custom projectile types can be defined and applied to items in kits. These items effectively become either weapons that shoot the custom projectile, or the item form of the custom projectile itself.
Projectiles Element | Description | |
---|---|---|
<projectiles> </projectiles>
|
Node containing the custom projectile definitions. | |
Sub-elements | Value/Children | |
<projectile> </projectile>
|
A custom projectile definition. | Projectile Sub-elements |
Attribute | Description | Value | Default |
---|---|---|---|
id
|
Unique identifier used to reference this projectile from other places in the XML. | String | |
name
|
The display name of this projectile, used in "shot by" messages, etc. | String | |
throwable
|
Items are consumed when using them to shoot this projectile (making them more like grenades than guns). | true/false | true |
projectile
|
The entity this projectile is materialized as. | Entity Type | Arrow |
damage
|
The amount of damage this projectile deals. | Half-hearts | 0.0 |
velocity
|
The speed at which the projectile moves. | Meters/tick | 1.0 |
click
|
The click action that fires the projectile.
Accepts right , left or both .
|
Click Action |
both
|
effects
|
The potion effects to apply to players hit by this projectile. | Potion Effect | |
destroy-filter
|
Property Filter if/what blocks get destroyed when hit with this projectile. | Filter |
deny-all
|
cooldown
|
Minimum time between each firing of this projectile. | Time Period |
Element | Description | Value/Children |
---|---|---|
<destroy-filter>
|
Property Filter if/what blocks get destroyed when hit with this projectile. | Filters |
<effect>
|
A potion effect to apply to players hit by this projectile. | Potion Effect |
<!-- Create the projectile "template" -->
<projectiles>
<projectile
id="lazer"
name="lazer"
projectile="Snowball"
velocity="3.5"
damage="50"
throwable="false"
cooldown="5s"/>
</projectiles>
<!-- Apply the projectile to an item -->
<kits>
<kit name="lazer-kit">
<item projectile="lazer" name="`alazer gun" material="stick"/>
</kit>
</kits>
Bows can be modified to shoot a different projectile at a custom speed. The PGM plugin will calculate the damage the projectile does using the same formula as minecraft does for arrows. This means that a flying fish with a velocity of 40 will almost certainly kill you. Projectiles can also have custom potion effects which are applied to the target when it is hit.
NOTE:
You can currently only modify all bow projectiles, this means no normal and custom bow at the same time.
Projectiles Element | Description | Value/Children |
---|---|---|
<modifybowprojectile> </...>
|
Node containing the modify bow projectile settings. | Bow Projectile Sub-elements |
Sub-elements | ||
<projectile> </projectile>
|
The entity to use as the bows projectile. | Entity Type |
<velocityMod> </velocityMod>
|
The velocity modifier of the bows projectile. | Number |
<effect> </effect>
|
A potion effect to apply to players hit by the bow projectile. | Potion Effect |
Examples
<modifybowprojectile>
<projectile>EnderPearl</projectile>
<velocityMod>2.5</velocityMod>
<!-- Projectile potion effect -->
<effect duration="5" amplifier="1">poison</effect>
</modifybowprojectile>
<modifybowprojectile>
<effect duration="8" amplifier="1">wither</effect>
</modifybowprojectile>
All the following projectiles are guaranteed to work. See mrapple/Bukkit Entity Spawning.md for a list of tested entities.
Supported Entity Types | ||
---|---|---|
Arrow
|
Egg
|
|
EnderPearl
|
Fireball
|
|
LargeFireball
|
SmallFireball
|
|
Snowball
|
ThrownExpBottle
|
|
WitherSkull
|
TNTPrimed
|