diff options
Diffstat (limited to 'src/StardewModdingAPI/Events/MineEvents.cs')
-rw-r--r-- | src/StardewModdingAPI/Events/MineEvents.cs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/StardewModdingAPI/Events/MineEvents.cs b/src/StardewModdingAPI/Events/MineEvents.cs index 8b91d7d7..9cf7edac 100644 --- a/src/StardewModdingAPI/Events/MineEvents.cs +++ b/src/StardewModdingAPI/Events/MineEvents.cs @@ -1,4 +1,5 @@ using System; +using StardewModdingAPI.Framework; namespace StardewModdingAPI.Events { @@ -16,11 +17,12 @@ namespace StardewModdingAPI.Events ** Internal methods *********/ /// <summary>Raise a <see cref="MineLevelChanged"/> event.</summary> + /// <param name="monitor">Encapsulates monitoring and logging.</param> /// <param name="previousMineLevel">The previous mine level.</param> /// <param name="currentMineLevel">The current mine level.</param> - internal static void InvokeMineLevelChanged(int previousMineLevel, int currentMineLevel) + internal static void InvokeMineLevelChanged(IMonitor monitor, int previousMineLevel, int currentMineLevel) { - MineEvents.MineLevelChanged?.Invoke(null, new EventArgsMineLevelChanged(previousMineLevel, currentMineLevel)); + monitor.SafelyRaiseGenericEvent($"{nameof(MineEvents)}.{nameof(MineEvents.MineLevelChanged)}", MineEvents.MineLevelChanged?.GetInvocationList(), null, new EventArgsMineLevelChanged(previousMineLevel, currentMineLevel)); } } } |