public static void Init() { Player.Moved += Player_Moved; Player.JoinedWorld += Player_JoinedWorld; Player.PlacedBlock += Player_PlacedBlock; PortalDB.StartSaveTask(); }
public static PortalHandler GetInstance() { if (instance == null) { instance = new PortalHandler(); Player.Moved += new EventHandler <Events.PlayerMovedEventArgs>(Player_Moved); Player.JoinedWorld += new EventHandler <Events.PlayerJoinedWorldEventArgs>(Player_JoinedWorld); Player.PlacedBlock += new EventHandler <Events.PlayerPlacedBlockEventArgs>(Player_PlacedBlock); PortalDB.StartSaveTask(); } return(instance); }