Use ServiceGetter instead of Program.Get

master
D4VID 7 months ago
parent 2477147dc0
commit c8597f712d

@ -4,6 +4,7 @@ using System.Linq;
using CriticalPathAnalyzer.Server.Network; using CriticalPathAnalyzer.Server.Network;
using CriticalPathAnalyzer.Server.Tool; using CriticalPathAnalyzer.Server.Tool;
using CriticalPathAnalyzer.Shared.Packets.S2C; using CriticalPathAnalyzer.Shared.Packets.S2C;
using EccsLogicWorldAPI.Server;
using EccsLogicWorldAPI.Server.Injectors; using EccsLogicWorldAPI.Server.Injectors;
using EccsLogicWorldAPI.Shared.PacketWrapper; using EccsLogicWorldAPI.Shared.PacketWrapper;
using LogicAPI.Data; using LogicAPI.Data;
@ -28,7 +29,7 @@ namespace CriticalPathAnalyzer.Server {
Logger.Info("CriticalPathAnalyzer server mod loading"); Logger.Info("CriticalPathAnalyzer server mod loading");
LoggerInstance = Logger; LoggerInstance = Logger;
_networkServer = Program.Get<NetworkServer>(); _networkServer = ServiceGetter.getService<NetworkServer>();
if (_networkServer == null) { if (_networkServer == null) {
throw new Exception("Could not get Service 'NetworkServer'."); throw new Exception("Could not get Service 'NetworkServer'.");
} }

Loading…
Cancel
Save