Merge pull request #1579 from taion/fix-listener-return

fix: Fix handling listener return value
This commit is contained in:
Sam Potts 2020-01-13 15:59:36 +00:00 committed by GitHub
commit cb4dab4250
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -513,7 +513,7 @@ class Listeners {
}
// Only call default handler if not prevented in custom handler
if (returned && is.function(defaultHandler)) {
if (returned !== false && is.function(defaultHandler)) {
defaultHandler.call(player, event);
}
}