Skip to content

Commit

Permalink
Catch untrusted functions
Browse files Browse the repository at this point in the history
  • Loading branch information
andantet committed Jul 26, 2024
1 parent 1f5716e commit fa11d34
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 5 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ kotlin_version=1.9.24
fabric_kotlin_version=1.10.20

# Mod Properties
mod_version=1.1.4
mod_version=1.1.5

maven_group=net.mcbrawls
mod_id=brawls-entities
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,12 @@ open class PlayerAttachedTextDisplayEntity(
startRiding(player, true)
}

val text = textSupplier.getText(player, age)
setText(text)
try {
val text = textSupplier.getText(player, age)
setText(text)
} catch (exception: Exception) {
exception.printStackTrace()
}
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,12 @@ open class TemporaryTextDisplayEntity(
val yOffset = MAX_Y_OFFSET * percentage
setPosition(initialPosition.add(0.0, yOffset, 0.0))

val text = textSupplier.getText(this, age)
setText(text)
try {
val text = textSupplier.getText(this, age)
setText(text)
} catch (exception: Exception) {
exception.printStackTrace()
}
}
}

Expand Down

0 comments on commit fa11d34

Please sign in to comment.