Skip to content

Commit

Permalink
Update to 1.21.2-rc2
Browse files Browse the repository at this point in the history
  • Loading branch information
DrexHD committed Oct 22, 2024
1 parent c171db2 commit 6047de3
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 9 deletions.
3 changes: 2 additions & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -132,10 +132,11 @@ publishMods {
modLoaders.add("quilt")

val minecraftVersion = rootProject.libs.versions.minecraft.get()
val curseForgeMinecraftVersion = rootProject.libs.versions.curseforge.minecraft.get()
curseforge {
accessToken.set(providers.environmentVariable("CF_API_TOKEN"))
projectId.set("482904")
minecraftVersions.add(minecraftVersion)
minecraftVersions.add(curseForgeMinecraftVersion)
}
modrinth {
accessToken.set(providers.environmentVariable("MODRINTH_TOKEN"))
Expand Down
13 changes: 7 additions & 6 deletions libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
[versions]
minecraft = "24w39a"
fabric-loader = "0.16.5"
yarn-mappings = "24w39a+build.8"
minecraft = "1.21.2-rc2"
curseforge-minecraft="1.21.2-Snapshot"
fabric-loader = "0.16.7"
yarn-mappings = "1.21.2-rc2+build.2"

fabric-api = "0.105.1+1.21.2"
fabric-api = "0.106.1+1.21.2"

# Kotlin
fabric-kotlin = "1.12.1+kotlin.2.0.20"
Expand All @@ -14,9 +15,9 @@ mc-discord-reserializer = "4.3.0"
emoji-java = "5.1.1"
adventure-gson = "4.16.0"

placeholder-api = "2.4.1+1.21"
placeholder-api = "2.5.0+1.21.2"
permission-api = "0.3.1"
vanish-api = "1.5.7+1.21.1"
vanish-api = "1.5.7+1.21.2-rc2"
konf = "1.1.2"

[libraries]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ suspend fun ServerPlayerEntity.syncDiscord() {
}

suspend fun ServerPlayerEntity.syncLinkedName() {
if (!config[LinkingSpec.nicknameSync] || !Permissions.check(this, "blockbot.sync.name", true)) return
if (!config[LinkingSpec.nicknameSync] || !Permissions.check(this.commandSource, "blockbot.sync.name", true)) return
val member = getLinkedAccount()?.asMemberOrNull(Snowflake(config[BotSpec.guild]))
member?.edit {
nickname = name.string
Expand All @@ -155,7 +155,7 @@ suspend fun ServerPlayerEntity.syncLinkedRoles() {
val roles = member.roles.map { it.id.value }.toList()
config[LinkingSpec.syncedRoles].entries
.forEach { syncedRole ->
val hasPermission = Permissions.check(this@syncLinkedRoles, "blockbot.sync.roles.${syncedRole.key}", 4)
val hasPermission = Permissions.check(this@syncLinkedRoles.commandSource, "blockbot.sync.roles.${syncedRole.key}", 4)
if (roles.contains(syncedRole.value) && !hasPermission) {
member.removeRole(Snowflake(syncedRole.value), "blockbot role sync")
} else if (!roles.contains(syncedRole.value) && hasPermission) {
Expand Down

0 comments on commit 6047de3

Please sign in to comment.