Endermanbugzjfc / Quest

Opening the source from one of my cancelled commission.
https://poggit.pmmp.io/ci/Endermanbugzjfc/Quest/Quest/
Apache License 2.0
3 stars 3 forks source link

https://crash.pmmp.io/view/8184492 #1

Open Endermanbugzjfc opened 1 year ago

Endermanbugzjfc commented 1 year ago

https://crash.pmmp.io/view/8184492

DuoIncure commented 1 year ago

This crash is caused as the NPCSubcommand class adds "" around the {player} variable:

https://github.com/Endermanbugzjfc/Quest/blob/9785e8784ca38af04812bdc9280f1f72a025be62/src/Endermanbugzjfc/Quest/commands/NPCSubcommand.php#L81

But SimpleNPC also adds "" around the {player} variable already:

https://github.com/brokiem/SimpleNPC/blob/0a2ec1ec5105b141196bde4847074a33324c19c9/src/brokiem/snpc/entity/CustomHuman.php#L109

Which means $args[1] inside DialogSubcommand is becoming PlayerName"" instead of just PlayerName. If you remove the "" from NPCSubcommand the crash no longer happens and the dialog should work as intended.

This is the same issue as #2 .

Endermanbugzjfc commented 1 year ago

This crash is caused as the NPCSubcommand class adds "" around the {player} variable:

https://github.com/Endermanbugzjfc/Quest/blob/9785e8784ca38af04812bdc9280f1f72a025be62/src/Endermanbugzjfc/Quest/commands/NPCSubcommand.php#L81

But SimpleNPC also adds "" around the {player} variable already:

https://github.com/brokiem/SimpleNPC/blob/0a2ec1ec5105b141196bde4847074a33324c19c9/src/brokiem/snpc/entity/CustomHuman.php#L109

Which means $args[1] inside DialogSubcommand is becoming PlayerName"" instead of just PlayerName. If you remove the "" from NPCSubcommand the crash no longer happens and the dialog should work as intended.

This is the same issue as #2 .

Thank you.