Skip to content

Commit

Permalink
refactor: replace get with indexing operator
Browse files Browse the repository at this point in the history
  • Loading branch information
rvbsm committed Mar 30, 2024
1 parent bd3a8d9 commit def2fed
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ enum class RestrictCommand(
override val arguments: List<CommandArgument<FabricClientCommandSource, *>> = listOf(ProfileNameArgument)

override fun executes(ctx: CommandContext<FabricClientCommandSource>): Int {
val profileName = ProfileNameArgument.get(ctx)
val profileName = ProfileNameArgument[ctx]
val id = ctx.source.client.networkHandler?.getPlayerListEntry(profileName)?.profile?.id
?: throw GameProfileArgumentType.UNKNOWN_PLAYER_EXCEPTION.create()

Expand Down

0 comments on commit def2fed

Please sign in to comment.