MagicSpells-4.0-Beta-17
·
124 commits
to main
since this release
Note
4.0 Beta 17 has been tested on 1.21.4 through 1.21.8.
Notes for developers:
As of #1024 BuffSpell#turnOff is no longer an abstract method, but it now calls BuffSpell#turnOff(LivingEntity) for all entities in a new BuffSpell#getActiveEntities method, so you don't have to call it yourself. When implementing Buff spells, please override BuffSpell#getActiveEntities, and if you implement BuffSpell#turnOff, call super.turnOff().
Breaking Changes:
- The default value for the
DrainlifeSpelloptionstake-type&give-typehas been changed from the deprecatedhealthtype tohealth_points.healthand its related spell optionsdamage-typeandignore-armor, which depend on Bukkit Damage Causes, should be replaced with the newdrain-damage-typeoption. - Passive spells configured with
helper-spell: truewill now trigger for any player. - The
ParticleCloudSpelloptionpotion-effectsnow relies on the common Potion Effects List format, which causes a minor breaking change in the string variant of the format (<potion> <duration> <amplifier> <ambient> <particles> <icon>), whereambientnow refers toggleshidden, andparticlesnow togglesambient.
Changes:
- Removed character limitation (alphanumeric +
_) on default values of the%argplaceholder in spell messages and string expressions. - Removed
[3, 16]length limitation on player names in string expressions for the%playervarand%playerpapiplaceholders. - Spell
cooldownnow supports function expressions. RegrowSpellcan now targetbogged.ShearSpellcan now target allShearable. Addedvanilla-sheep-shearingboolean option for backwards compatibility, which defaults tofalse.- Some of our features have been deprecated, and better alternatives have been added. More information can be found on the linked pages:
InvulernabilitySpell-damage-causesResistSpell-normal-damage-typesDotSpell-damage-typeDrainlifeSpell-healthdrain typePainSpell-damage-typefataldamagepassive triggergivedamagepassive triggertakedamagepassive triggerhasitemmodifier condition
MagicSpellsEntityDamageByEntityEventnow has its ownHandlerList; this requires plugins to listen for it explicitly. This event should generally not be used.InvulnerabilitySpell,ResistSpell,fataldamage,givedamage,takedamagestill listen to the event for legacy support.- Removed most usages of
MagicSpellsEntityDamageByEntityEvent. - Lowered the default value of the
buff-check-intervaloption ingeneral.ymlfrom100to1. - The
durationoption of buff spells now supports variable replacement. - Non-players can now activate the
equipandunequippassive triggers. - The
invertandpass-powersubspell cast arguments now support expressions. - Item Entity Data options, such as entity equipment and the
item_display'sitem, now support string expressions and the vanilla item format. - Due to a Paper bug which causes maximum bow force not to be restrained in the
[0, 1]interval, the default for theBowSpelloptionmaximum-forcehas been changed from1to0so that it's not checked by default. - Spell
effectsmay now be a list of configuration sections rather than being mapped to a name.effects: - position: target effect: lightning
Additions:
- Added predefined spell tags:
magicspells:beneficialfor spells configured withbeneficial: truemagicspells:helper-spellfor spells configured withhelper-spell: true
- The Legacy String Spell Filter now supports a new form of a String Spell Filter with logical expressions. Some options that only supported the Config Spell Filter now also support the new String filter (but not the legacy one):
- General Spell Config |
interrupt-filter ImpactRecordSpell|filterListSpell|filter
- General Spell Config |
- Added meta variables:
meta_attack_cooldown- It gets the current cooldown for a player's attack, with1.0representing a fully charged attack.meta_current_tickmeta_body_yaw
- Added the
respect-item-cooldownsoption togeneral.yml, which defaults tofalse. Whentrue, an item with a cooldown (white hotbar overlay) cannot be used to cast or cycle spells. - Spell
shared-cooldownhas been expanded with a Config format and Spell Filters. - Added
usingitemmodifier condition. Passes if the Magic Item in the ConditionArg is actively "used" or consumed. - Added the
transform-entitiesoption toLightningSpell. Defaults totrue. Whentransform-entities: false, the lightning spawned by the spell will not transform entities (turn villagers into witches, pigs into zombified piglins, etc.). - Added support for the
armorstandeffect on theProjectileSpell. - Added the
inputpassive trigger. - Added the
inputmodifier condition. - Added the
trailsection to theparticlesspell effect, for use withparticle-name: trail. - Added the
stop-on-successoption toTargetedMultiSpell. Defaults tofalse. Stops subspell processing when a subspell successfully casts. - Added the
real-time-durationoption to buff spells. Defaults tofalse. Whentrue, duration is tracked using real time, instead of ticks. As such, lag will not impact the duration of the buff spell. - Added options to Entity Data:
health(Double)attribute-modifierspotion-effects
- Added the
pass-argssubspell cast argument. Withpass-args=true, arguments from the parent spell cast are used for the subspell cast, instead of the value of theargssubspell cast argument. - Added the
.targeted.GlowSpellas a replacement to the now deprecated.targeted.ext.GlowSpell. - Added options
ParticleCloudSpellto configure particles:dust_color_transition-color,to-colorandsizeoptions under adust-transitionsectionentity_effect-argb-coloroption
- Added
apply-physicstoReplaceSpell, a boolean option, defaulting totrue. - Added
wait-time(Integer, defaults to0) toparticlecloudspell effect. This overrides the default behaviour where the radius is ignored for 20 ticks and particles only spawn at the center of the cloud. - Added
str-cant-cast-by-commandtogeneral.yml. This lets you configure the existing message sent by/ms cast self(/c) when the spell is configured withcan-cast-by-command: false. - Spells with
helper-spell: truenow allow for any player to use their configuredincantations. - Added biome tag support to the
biomemodifier condition. - Added the
swinghandspell effect.
Fixes:
- Fixed an issue where the
ModifyCooldownSpellonly worked if the spell was on cooldown. - Fixed an issue with the
LightwalkSpellthrowing errors while turning off and not removing light blocks in some cases. - Fixed an issue with the
LilywalkSpellnot working correctly. - Fixed an issue with Subspell's
chancecast argument being in the range0-1instead of0-100. - Fixed an issue with the
ExternalCommandSpell'sblock-chat-outputandstore-chat-outputoptions, which didn't correctly capture plugin chat message types. Those options unfortunately can no longer capture Vanilla command chat output. - Fixed an issue with the
DisguiseSpellsending errors when LibsDisguises wasn't present. - Fixed an issue with the
SpawnEntitySpellthrowing an error during reload if an entity withdurationdid not expire. - Fixed an issue with the
tickspassive trigger causing errors when misconfigured. - Fixed an issue with the
effectlibeffect particlecoloroption throwing errors when set torandom. - Fixed an issue where playing the
entityandarmorstandeffect withdelaydid not pass the spawned entities to spells that should remove them on reload or drag them along their path, such as orbits, projectiles, etc. - Fixed an issue where the
HomingMissileSpellwas not cleaned up on plugin reload. - Fixed an issue with the
vibration-originoption that prevented it from functioning. - Fixed an issue with the
stop-on-failoption ofTargetedMultiSpellthat prevented delayed spells from being cancelled when a subspell cast failed. - Fixed an issue with tick-based buff spell duration being inaccurate.
- Fixed an issue with
defaults.ymlthat caused certain options to fail to inherit default values. - Fixed an issue with string expressions and rounding in placeholders that supports specifying precision.
- Fixed an issue where orbit and buff spell effects stopped playing after player death even if the buff remained active. It will now resume after respawn.
- Fixed issues with
LoopSpell:- If the target was a dead Player, the loop used to end instead of pausing.
- If there was no target, the Loop didn't check if the caster was dead to cancel the loop or pause it if the caster was a Player.
- If the Loop was cast without a caster, some errors used to be thrown under some circumstances.
UnbindSpellno longer reloads the spellbook (which removes all active buffs of the target) when cast to unbind all spells of an item (/c (unbind) *).- Fixed an issue with
AreaEffectSpellnot shuffling collected targets. - Fixed an issue where boolean expressions used
falsefor invalid values, instead of the supplied default value. - Fixed an issue with the
ParticleCloudSpellspawning in a cloud with a visible empty name tag even ifcustom-namewas left empty. - Fixed an issue with the
particlecloudspell effect not playing correctly when played on an entity rather than a location. - Fixed an issue with the color of the
entity_effectparticle in theParticleCloudSpellbeing overridden by thepotion-effectscolor. - Fixed an issue with MagicSpells registering permissions, where they are now bulk-registered instead of individually, causing multiple recalculations. It also only added permissions on initial load, meaning that permission defaults would remain the same (e.g.
ops-have/ignore-...options ingeneral.yml). You should notice a significant reduction in the time taken for new spells to be loaded, whether on startup or later. - Fixed an issue with
ProjectileSpellthat prevented effects in thecasterandtargeteffect positions from playing properly. - Fixed an issue with the
hitarrowandmissarrowpassive triggers that caused them to check the currently held item, instead of the item the arrow was shot with. - Fixed an issue with
intermediate-special-effect-locationsoption inHomingMissileSpell&HomingProjectileSpellalways setting the value to0. - Fixed an issue where the team applied to the non-players could not be identified through
onsameteam&onteammodifier conditions. - Fixed an issue where most buff spells during plugin reload did not run turn off logic properly, such as sending
str-fadeand castingspell-on-end. - Since
1.21.2, attributes were renamed to remove prefixes such asgeneric,player, andzombie. Since4.0 Beta 16, attribute meta variables have been automatically renamed. In this release, we have reintroduced the old meta variables for legacy support. - Fixed an old issue where
MenuSpellandPlayerMenuSpellspells with options that open new menu spells automatically close all menus withstay-open: falseinstead of only the initial menu.