We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I tried debugging in many areas, I found out that the LevelSoundEventHandler too does not seem to get called anymore. my vanilla dragonfly code:
LevelSoundEventHandler
type handler struct { player.NopHandler } func (h handler) HandlePunchAir(*event.Context) { fmt.Println("punch air") } func main() { log := logrus.New() log.Formatter = &logrus.TextFormatter{ForceColors: true} log.Level = logrus.DebugLevel chat.Global.Subscribe(chat.StdoutSubscriber{}) conf, err := readConfig(log) if err != nil { log.Fatalln(err) } srv := conf.New() srv.CloseOnProgramEnd() srv.Listen() for srv.Accept(func(p *player.Player) { p.Handle(handler{}) }) { } } // readConfig reads the configuration from the config.toml file, or creates the // file if it does not yet exist. func readConfig(log server.Logger) (server.Config, error) { c := server.DefaultConfig() var zero server.Config if _, err := os.Stat("config.toml"); os.IsNotExist(err) { data, err := toml.Marshal(c) if err != nil { return zero, fmt.Errorf("encode default config: %v", err) } if err := os.WriteFile("config.toml", data, 0644); err != nil { return zero, fmt.Errorf("create default config: %v", err) } return c.Config(log) } data, err := os.ReadFile("config.toml") if err != nil { return zero, fmt.Errorf("read config: %v", err) } if err := toml.Unmarshal(data, &c); err != nil { return zero, fmt.Errorf("decode config: %v", err) } return c.Config(log) }
The text was updated successfully, but these errors were encountered:
281943e
No branches or pull requests
I tried debugging in many areas, I found out that the
LevelSoundEventHandler
too does not seem to get called anymore.my vanilla dragonfly code:
The text was updated successfully, but these errors were encountered: