Fix CombinedScope

This commit is contained in:
Him188 2020-09-11 23:22:43 +08:00
parent 2223451b70
commit e41a2c0d09

View File

@ -526,8 +526,8 @@ internal fun MessageScope.asSequence(): Sequence<MessageScope> {
} }
private class CombinedScope( private class CombinedScope(
private val first: MessageScope, val first: MessageScope,
private val second: MessageScope val second: MessageScope,
) : MessageScope { ) : MessageScope {
override val realTarget: Any? get() = null override val realTarget: Any? get() = null
@ -549,7 +549,7 @@ private class CombinedScope(
} }
private class CommandSenderAsMessageScope( private class CommandSenderAsMessageScope(
private val sender: CommandSender private val sender: CommandSender,
) : MessageScope { ) : MessageScope {
override val realTarget: Any? override val realTarget: Any?
get() = sender.user ?: sender // ConsoleCommandSender get() = sender.user ?: sender // ConsoleCommandSender
@ -564,7 +564,7 @@ private class CommandSenderAsMessageScope(
} }
private class ContactAsMessageScope( private class ContactAsMessageScope(
private val sender: Contact private val sender: Contact,
) : MessageScope { ) : MessageScope {
override val realTarget: Any? override val realTarget: Any?
get() = sender get() = sender