From 2765e3f9b379f0dc2a5732c1ca9ba23dbe2a7f15 Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Wed, 13 Apr 2022 22:06:07 -0400 Subject: enable nullable annotations in bundled mods (#837) --- .../Framework/Commands/Player/SetStyleCommand.cs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/SMAPI.Mods.ConsoleCommands/Framework/Commands/Player/SetStyleCommand.cs') diff --git a/src/SMAPI.Mods.ConsoleCommands/Framework/Commands/Player/SetStyleCommand.cs b/src/SMAPI.Mods.ConsoleCommands/Framework/Commands/Player/SetStyleCommand.cs index 84625a34..8193ff27 100644 --- a/src/SMAPI.Mods.ConsoleCommands/Framework/Commands/Player/SetStyleCommand.cs +++ b/src/SMAPI.Mods.ConsoleCommands/Framework/Commands/Player/SetStyleCommand.cs @@ -1,5 +1,3 @@ -#nullable disable - using System.Diagnostics.CodeAnalysis; using StardewValley; @@ -23,7 +21,7 @@ namespace StardewModdingAPI.Mods.ConsoleCommands.Framework.Commands.Player public override void Handle(IMonitor monitor, string command, ArgumentParser args) { // parse arguments - if (!args.TryGet(0, "target", out string target, oneOf: new[] { "hair", "shirt", "acc", "skin", "shoe", "swim", "gender" })) + if (!args.TryGet(0, "target", out string? target, oneOf: new[] { "hair", "shirt", "acc", "skin", "shoe", "swim", "gender" })) return; if (!args.TryGetInt(1, "style ID", out int styleID)) return; -- cgit