Skip to content

Commit

Permalink
Clear previous entries as we're setting
Browse files Browse the repository at this point in the history
  • Loading branch information
devoxin committed Dec 29, 2020
1 parent 6eb33dd commit b86fdb3
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/main/kotlin/me/devoxin/flight/api/CommandClientBuilder.kt
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ class CommandClientBuilder {
* @return The builder instance. Useful for chaining.
*/
fun setOwnerIds(vararg ids: Long): CommandClientBuilder {
this.ownerIds.clear()
this.ownerIds.addAll(ids.toTypedArray())
return this
}
Expand All @@ -106,6 +107,7 @@ class CommandClientBuilder {
* @return The builder instance. Useful for chaining.
*/
fun setOwnerIds(vararg ids: String): CommandClientBuilder {
this.ownerIds.clear()
this.ownerIds.addAll(ids.map(String::toLong))
return this
}
Expand Down

0 comments on commit b86fdb3

Please sign in to comment.