Skip to content

Commit

Permalink
change(api): call StockSaveEvent for compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
Siroshun09 committed Oct 12, 2021
1 parent 4035de8 commit 279357a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
/**
* A {@link StockEvent} called when the stockholder has been saved.
*
* @deprecated use {@link net.okocraft.box.api.event.stockholder.StockHolderSaveEvent}. This event is no longer called.
* @deprecated use {@link net.okocraft.box.api.event.stockholder.StockHolderSaveEvent}
*/
@Deprecated(forRemoval = true)
@ApiStatus.ScheduledForRemoval(inVersion = "4.2.0")
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package net.okocraft.box.api.event.stockholder;

import net.okocraft.box.api.BoxProvider;
import net.okocraft.box.api.event.stock.StockSaveEvent;
import net.okocraft.box.api.model.stock.StockHolder;
import org.jetbrains.annotations.NotNull;

Expand All @@ -15,6 +17,7 @@ public class StockHolderSaveEvent extends StockHolderEvent {
*/
public StockHolderSaveEvent(@NotNull StockHolder stockHolder) {
super(stockHolder);
BoxProvider.get().getEventBus().callEvent(new StockSaveEvent(stockHolder));
}

@Override
Expand Down

0 comments on commit 279357a

Please sign in to comment.