// Load loads a plugin (shared library) from the specified path.
// It returns an error if the file could not be found.
Load loads a plugin (shared library) from the specified path.
It returns an error if the file could not be found.
// Load loads a plugin ( shared library ) from the specified path . // It returns an error if the file could not be found .
func (h *PluginManager) Load(path string) error {
	p, err := plugin.Open(path)
	if err != nil {
		h.parent.DebugMessage(shared.ModPluginLoader, "Error loading plugin: "+err.Error())
		return &LoaderError{err}
	}
	loaded := h.loadKeyListeners(p)
	if loaded {
		h.parent.DebugMessage(shared.ModPluginLoader, "Loaded a key listener")
	} else {
		h.parent.DebugMessage(shared.ModPluginLoader, "Couldn't load a key listener")
	}
	return nil
}
func ( h * PluginManager ) Load ( path string ) error { p , err := plugin . Open ( path ) if err != nil { h . parent . DebugMessage ( shared . ModPluginLoader , " " + err . Error ( ) ) return & LoaderError { err } } loaded := h . loadKeyListeners ( p ) if loaded { h . parent . DebugMessage ( shared . ModPluginLoader , " " ) } else { h . parent . DebugMessage ( shared . ModPluginLoader , " " ) } return nil }
Load loads a plugin (shared library) from the specified path.
Load loads a plugin ( shared library ) from the specified path .