@@ -85,7 +85,7 @@ public interface DamageCalculationEvent extends Event, Cancellable {
8585 interface Pre extends DamageCalculationEvent {
8686
8787 /**
88- * Gets a mutable list of all modifiers that applies just before the step.
88+ * Gets an unmodifiable list of all modifiers that applies just before the step.
8989 *
9090 * @param type The step type
9191 * @return The list of modifiers
@@ -95,15 +95,33 @@ default List<DamageModifier> modifiersBefore(Supplier<DamageStepType> type) {
9595 }
9696
9797 /**
98- * Gets a mutable list of all modifiers that applies just before the step.
98+ * Gets an unmodifiable list of all modifiers that applies just before the step.
9999 *
100100 * @param type The step type
101101 * @return The list of modifiers
102102 */
103103 List <DamageModifier > modifiersBefore (DamageStepType type );
104104
105105 /**
106- * Gets a mutable list of all modifiers that applies just after the step.
106+ * Adds a modifier that applies just before the step.
107+ *
108+ * @param type The step type
109+ * @param modifier The modifier
110+ */
111+ default void addModifierBefore (Supplier <DamageStepType > type , DamageModifier modifier ) {
112+ this .addModifierBefore (type .get (), modifier );
113+ }
114+
115+ /**
116+ * Adds a modifier that applies just before the step.
117+ *
118+ * @param type The step type
119+ * @param modifier The modifier
120+ */
121+ void addModifierBefore (DamageStepType type , DamageModifier modifier );
122+
123+ /**
124+ * Gets an unmodifiable list of all modifiers that applies just after the step.
107125 *
108126 * @param type The step type
109127 * @return The list of modifiers
@@ -113,12 +131,30 @@ default List<DamageModifier> modifiersAfter(Supplier<DamageStepType> type) {
113131 }
114132
115133 /**
116- * Gets a mutable list of all modifiers that applies just after the step.
134+ * Gets an unmodifiable list of all modifiers that applies just after the step.
117135 *
118136 * @param type The step type
119137 * @return The list of modifiers
120138 */
121139 List <DamageModifier > modifiersAfter (DamageStepType type );
140+
141+ /**
142+ * Adds a modifier that applies just after the step.
143+ *
144+ * @param type The step type
145+ * @param modifier The modifier
146+ */
147+ default void addModifierAfter (Supplier <DamageStepType > type , DamageModifier modifier ) {
148+ this .addModifierAfter (type .get (), modifier );
149+ }
150+
151+ /**
152+ * Adds a modifier that applies just after the step.
153+ *
154+ * @param type The step type
155+ * @param modifier The modifier
156+ */
157+ void addModifierAfter (DamageStepType type , DamageModifier modifier );
122158 }
123159
124160 /**
0 commit comments