diff --git a/Server.Packets/PacketForwardingService.cs b/Server.Packets/PacketForwardingService.cs index 794af3e..8f08b79 100644 --- a/Server.Packets/PacketForwardingService.cs +++ b/Server.Packets/PacketForwardingService.cs @@ -17,7 +17,8 @@ public class PacketForwardingService // Get all types that implement IPacket and have a PacketIdAttribute _packets = assembly.GetTypes() .Select(x => (attr: x.GetCustomAttribute(), ctor: x.GetConstructor(Type.EmptyTypes))) - .Where(x => x.attr != null && x.ctor != null && x.GetType().IsAssignableFrom(typeof(IPacket))) + .Where(x => x.attr != null && x.ctor != null && x.GetType().IsAssignableTo(typeof(IPacket)) && + x.GetType().IsClass) .ToImmutableDictionary(x => x.attr!.PacketId, x => x.ctor)!; }