private void StopEmoteNpc(string command, string[] args) { if (!Context.IsMainPlayer && !Config.AllowNonHostEmoteNpcCommand) { this.Monitor.Log(I18n.Command_PermissionsDenied(), LogLevel.Info); return; } if (args.Length < 2) { this.Monitor.Log($"{I18n.Command_MissingParameters()}\n\n{I18n.Command_StopEmoteNpc_Usage()}", LogLevel.Info); return; } NPC npc = Game1.getCharacterFromName(args[0], mustBeVillager: false); if (npc == null) { this.Monitor.Log($"Could not find any NPC with the name \"{args[0]}\".", LogLevel.Info); return; } if (npc.IsEmoting) { this.Monitor.Log($"Stoping {args[0]} from playing emote...", LogLevel.Info); npc.IsEmoting = false; } else { this.Monitor.Log($"No emote is being played by {args[0]}.", LogLevel.Info); } }