File tree Expand file tree Collapse file tree 3 files changed +11
-9
lines changed
src/main/kotlin/io/github/quiltservertools/blockbotdiscord/extensions/linking Expand file tree Collapse file tree 3 files changed +11
-9
lines changed Original file line number Diff line number Diff line change @@ -132,10 +132,11 @@ publishMods {
132132 modLoaders.add(" quilt" )
133133
134134 val minecraftVersion = rootProject.libs.versions.minecraft.get()
135+ val curseForgeMinecraftVersion = rootProject.libs.versions.curseforge.minecraft.get()
135136 curseforge {
136137 accessToken.set(providers.environmentVariable(" CF_API_TOKEN" ))
137138 projectId.set(" 482904" )
138- minecraftVersions.add(minecraftVersion )
139+ minecraftVersions.add(curseForgeMinecraftVersion )
139140 }
140141 modrinth {
141142 accessToken.set(providers.environmentVariable(" MODRINTH_TOKEN" ))
Original file line number Diff line number Diff line change 11[versions ]
2- minecraft = " 24w39a"
3- fabric-loader = " 0.16.5"
4- yarn-mappings = " 24w39a+build.8"
2+ minecraft = " 1.21.2-rc2"
3+ curseforge-minecraft =" 1.21.2-Snapshot"
4+ fabric-loader = " 0.16.7"
5+ yarn-mappings = " 1.21.2-rc2+build.2"
56
6- fabric-api = " 0.105 .1+1.21.2"
7+ fabric-api = " 0.106 .1+1.21.2"
78
89# Kotlin
910fabric-kotlin = " 1.12.1+kotlin.2.0.20"
@@ -14,9 +15,9 @@ mc-discord-reserializer = "4.3.0"
1415emoji-java = " 5.1.1"
1516adventure-gson = " 4.16.0"
1617
17- placeholder-api = " 2.4.1 +1.21"
18+ placeholder-api = " 2.5.0 +1.21.2 "
1819permission-api = " 0.3.1"
19- vanish-api = " 1.5.7+1.21.1 "
20+ vanish-api = " 1.5.7+1.21.2-rc2 "
2021konf = " 1.1.2"
2122
2223[libraries ]
Original file line number Diff line number Diff line change @@ -143,7 +143,7 @@ suspend fun ServerPlayerEntity.syncDiscord() {
143143}
144144
145145suspend fun ServerPlayerEntity.syncLinkedName () {
146- if (! config[LinkingSpec .nicknameSync] || ! Permissions .check(this , " blockbot.sync.name" , true )) return
146+ if (! config[LinkingSpec .nicknameSync] || ! Permissions .check(this .commandSource , " blockbot.sync.name" , true )) return
147147 val member = getLinkedAccount()?.asMemberOrNull(Snowflake (config[BotSpec .guild]))
148148 member?.edit {
149149 nickname = name.string
@@ -155,7 +155,7 @@ suspend fun ServerPlayerEntity.syncLinkedRoles() {
155155 val roles = member.roles.map { it.id.value }.toList()
156156 config[LinkingSpec .syncedRoles].entries
157157 .forEach { syncedRole ->
158- val hasPermission = Permissions .check(this @syncLinkedRoles, " blockbot.sync.roles.${syncedRole.key} " , 4 )
158+ val hasPermission = Permissions .check(this @syncLinkedRoles.commandSource , " blockbot.sync.roles.${syncedRole.key} " , 4 )
159159 if (roles.contains(syncedRole.value) && ! hasPermission) {
160160 member.removeRole(Snowflake (syncedRole.value), " blockbot role sync" )
161161 } else if (! roles.contains(syncedRole.value) && hasPermission) {
You can’t perform that action at this time.
0 commit comments