Skip to content

Commit e660add

Browse files
authored
Update AJoinEvent.kt
1 parent aeaa4e2 commit e660add

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main/kotlin/top/alazeprt/aqqbot/event/AJoinEvent.kt

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ object AJoinEvent {
2020
@Ghost
2121
@SubscribeEvent
2222
fun onJoin(event: AsyncPlayerPreLoginEvent) {
23-
if (!config.getBoolean("enable") || !config.getBoolean("whitelist.need_bind_to_login")) return
23+
if (!config.getBoolean("whitelist.enable") || !config.getBoolean("whitelist.need_bind_to_login")) return
2424
if (isFileStorage && event.name !in AQQBot.dataMap.values) {
2525
event.disallow(AsyncPlayerPreLoginEvent.Result.KICK_OTHER, formatString(get("game.not_bind", mutableMapOf(Pair("command", AQQBot.config.getStringList("whitelist.prefix.bind")[0])))))
2626
}
@@ -45,7 +45,7 @@ object AJoinEvent {
4545
@Ghost
4646
@SubscribeEvent
4747
fun onVCJoin(event: PostLoginEvent) {
48-
if (!config.getBoolean("enable") || !config.getBoolean("whitelist.need_bind_to_login")) return
48+
if (!config.getBoolean("whitelist.enable") || !config.getBoolean("whitelist.need_bind_to_login")) return
4949
if (isFileStorage && event.player.username !in AQQBot.dataMap.values) {
5050
event.player.disconnect(Component.text(formatString(get("game.not_bind", mutableMapOf(Pair("command", AQQBot.config.getStringList("whitelist.prefix.bind")[0]))))))
5151
}

0 commit comments

Comments
 (0)