Skip to content

Commit

Permalink
fix: remove misleading optional arguments in .use (#96)
Browse files Browse the repository at this point in the history
fixes: #87
  • Loading branch information
hugeblank authored Apr 3, 2024
1 parent 49abc3f commit cd8a1d4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/java/io/sc3/plethora/api/method/ArgumentExt.kt
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,8 @@ object ArgumentExt {

fun IArguments.optHand(index: Int): Hand {
return when (val hand = optString(index, "main")!!.lowercase()) {
"main", "mainhand", "right" -> Hand.MAIN_HAND
"off", "offhand", "left" -> Hand.OFF_HAND
"main", "mainhand" -> Hand.MAIN_HAND
"off", "offhand" -> Hand.OFF_HAND
else -> throw LuaException("Unknown hand '$hand', expected 'main' or 'off'")
}
}
Expand Down

0 comments on commit cd8a1d4

Please sign in to comment.