Skip to content

Commit

Permalink
Update EventDispatcher.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
Tides committed Jan 20, 2024
1 parent 872cc78 commit d0fb738
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions Obsidian/Services/EventDispatcher.cs
Original file line number Diff line number Diff line change
Expand Up @@ -154,8 +154,7 @@ public async ValueTask<EventResult> ExecuteEventAsync<TEventArgs>(TEventArgs eve
{
var eventType = eventArgs.GetType();
using var serviceScope = this.serviceProvider.CreateScope();

if (!this.registeredEvents.TryGetValue(eventArgs.Name, out var events))
if (!this.registeredEvents.TryGetValue(this.eventNames[typeof(TEventArgs)], out var events))
return EventResult.Completed;

var foundEvents = events.OrderBy(x => x.Priority);//Plugins with the lowest priority must be called first
Expand Down

0 comments on commit d0fb738

Please sign in to comment.