1212
1313import org .bukkit .entity .Player ;
1414import org .reflections .Reflections ;
15+
16+ import com .elmakers .mine .bukkit .action .BaseSpellAction ;
1517import com .elmakers .mine .bukkit .action .CastContext ;
1618import com .elmakers .mine .bukkit .action .CompoundAction ;
1719import com .elmakers .mine .bukkit .api .action .SpellAction ;
20+ import com .elmakers .mine .bukkit .api .spell .SpellResult ;
1821import com .elmakers .mine .bukkit .effect .EffectPlayer ;
1922import com .elmakers .mine .bukkit .effect .builtin .EffectSingle ;
2023import com .elmakers .mine .bukkit .entity .EntityData ;
@@ -147,13 +150,26 @@ private void generateActionMeta() {
147150 CastContext context = new CastContext (spell );
148151
149152 // First get base action parameters
150- SpellAction baseAction = new CompoundAction () {};
153+
154+ BaseSpellAction baseAction = new BaseSpellAction () {
155+ @ Override
156+ public SpellResult perform (com .elmakers .mine .bukkit .api .action .CastContext context ) {
157+ return SpellResult .NO_ACTION ;
158+ }
159+ };
151160 InterrogatingConfiguration baseConfiguration = new InterrogatingConfiguration (data .getParameterStore ());
152161 baseAction .initialize (spell , baseConfiguration );
153162 baseAction .prepare (context , baseConfiguration );
154163 ParameterList baseParameters = baseConfiguration .getParameters ();
155164 data .addActionParameters (baseParameters );
156165
166+ SpellAction compoundAction = new CompoundAction () {};
167+ InterrogatingConfiguration compoundConfiguration = new InterrogatingConfiguration (data .getParameterStore ());
168+ compoundAction .initialize (spell , compoundConfiguration );
169+ compoundAction .prepare (context , compoundConfiguration );
170+ ParameterList compoundParameters = compoundConfiguration .getParameters ();
171+ data .addCompoundActionParameters (compoundParameters );
172+
157173 for (Class <? extends SpellAction > actionClass : allClasses ) {
158174 if (!actionClass .getPackage ().getName ().equals (BUILTIN_SPELL_PACKAGE )
159175 || actionClass .getAnnotation (Deprecated .class ) != null
@@ -170,6 +186,7 @@ private void generateActionMeta() {
170186
171187 ParameterList spellParameters = actionConfiguration .getParameters ();
172188 spellParameters .removeDefaults (baseParameters );
189+ spellParameters .removeDefaults (compoundParameters );
173190 SpellActionDescription spellAction = new SpellActionDescription (actionClass , spellParameters );
174191 if (CompoundAction .class .isAssignableFrom (actionClass )) {
175192 spellAction .setCategory (getCategory ("compound" ).getKey ());
0 commit comments